{
  "openapi": "3.1.0",
  "info": {
    "title": "NayaLink API",
    "version": "1.0.0",
    "description": "Public API. Generated from the Tuyau contract via ts-morph; internal and @openapiIgnore-marked endpoints are excluded."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Profile"
    },
    {
      "name": "Tags"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "Links"
    },
    {
      "name": "Analytics"
    },
    {
      "name": "Api Tokens"
    }
  ],
  "paths": {
    "/api/v1/profile": {
      "get": {
        "tags": [
          "Profile"
        ],
        "summary": "profile.show",
        "description": "**Token scope:** `profile:read`",
        "operationId": "profile_show",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "avatarUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "email": {
                          "type": "string"
                        },
                        "emailVerifiedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "fullName": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "isAdmin": {
                          "type": "boolean"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "plan": {
                          "type": "object",
                          "properties": {
                            "slug": {
                              "type": "string"
                            },
                            "limits": {
                              "type": "object",
                              "properties": {
                                "maxLinksCreatedPerMonth": {
                                  "type": "number"
                                },
                                "maxTrackedVisitsPerMonth": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "maxLinksCreatedPerMonth",
                                "maxTrackedVisitsPerMonth"
                              ]
                            },
                            "organization": {
                              "type": "object",
                              "properties": {
                                "maxTags": {
                                  "type": "number"
                                },
                                "maxCampaigns": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "maxTags",
                                "maxCampaigns"
                              ]
                            },
                            "analytics": {
                              "type": "object",
                              "properties": {
                                "visitsTracking": {
                                  "type": "boolean"
                                },
                                "visitsFromQrCodesTracking": {
                                  "type": "boolean"
                                },
                                "utmTracking": {
                                  "type": "boolean"
                                },
                                "visitsByBrowser": {
                                  "type": "boolean"
                                },
                                "visitsByOperatingSystem": {
                                  "type": "boolean"
                                },
                                "visitsByDeviceType": {
                                  "type": "boolean"
                                },
                                "visitsByLanguage": {
                                  "type": "boolean"
                                },
                                "visitsByCountry": {
                                  "type": "boolean"
                                },
                                "visitsByCity": {
                                  "type": "boolean"
                                },
                                "visitsByReferer": {
                                  "type": "boolean"
                                },
                                "visitsOverTime": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "visitsTracking",
                                "visitsFromQrCodesTracking",
                                "utmTracking",
                                "visitsByBrowser",
                                "visitsByOperatingSystem",
                                "visitsByDeviceType",
                                "visitsByLanguage",
                                "visitsByCountry",
                                "visitsByCity",
                                "visitsByReferer",
                                "visitsOverTime"
                              ]
                            },
                            "link": {
                              "type": "object",
                              "properties": {
                                "customShortCode": {
                                  "type": "boolean"
                                },
                                "editShortCode": {
                                  "type": "boolean"
                                },
                                "editOriginalUrl": {
                                  "type": "boolean"
                                },
                                "linkExpiration": {
                                  "type": "boolean"
                                },
                                "passwordProtection": {
                                  "type": "boolean"
                                },
                                "dynamicRouting": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "customShortCode",
                                "editShortCode",
                                "editOriginalUrl",
                                "linkExpiration",
                                "passwordProtection",
                                "dynamicRouting"
                              ]
                            },
                            "developer": {
                              "type": "object",
                              "properties": {
                                "apiKeys": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "apiKeys"
                              ]
                            },
                            "usage": {
                              "type": "object",
                              "properties": {
                                "linksCreatedThisMonth": {
                                  "type": "number"
                                },
                                "visitsTrackedThisMonth": {
                                  "type": "number"
                                },
                                "tagsCount": {
                                  "type": "number"
                                },
                                "campaignsCount": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "linksCreatedThisMonth",
                                "visitsTrackedThisMonth",
                                "tagsCount",
                                "campaignsCount"
                              ]
                            },
                            "recommended": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "boolean"
                                }
                              ]
                            },
                            "recommendedPricing": {
                              "type": "object",
                              "properties": {
                                "monthly": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "number"
                                    },
                                    "currency": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                },
                                "yearly": {
                                  "type": "object",
                                  "properties": {
                                    "amount": {
                                      "type": "number"
                                    },
                                    "currency": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ]
                                }
                              },
                              "required": [
                                "monthly",
                                "yearly"
                              ]
                            }
                          },
                          "required": [
                            "slug",
                            "limits",
                            "organization",
                            "analytics",
                            "link",
                            "developer",
                            "usage"
                          ]
                        },
                        "initials": {
                          "type": "string"
                        },
                        "features": {
                          "type": "object",
                          "properties": {
                            "billingEnabled": {
                              "type": "boolean"
                            },
                            "linkCreationEnabled": {
                              "type": "boolean"
                            },
                            "campaignCreationEnabled": {
                              "type": "boolean"
                            },
                            "tagCreationEnabled": {
                              "type": "boolean"
                            },
                            "redirectCacheEnabled": {
                              "type": "boolean"
                            },
                            "visitTrackingEnabled": {
                              "type": "boolean"
                            },
                            "urlScanningEnabled": {
                              "type": "boolean"
                            },
                            "apiAccessEnabled": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "billingEnabled",
                            "linkCreationEnabled",
                            "campaignCreationEnabled",
                            "tagCreationEnabled",
                            "redirectCacheEnabled",
                            "visitTrackingEnabled",
                            "urlScanningEnabled",
                            "apiAccessEnabled"
                          ]
                        },
                        "hasPassword": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "avatarUrl",
                        "createdAt",
                        "email",
                        "emailVerifiedAt",
                        "fullName",
                        "id",
                        "isAdmin",
                        "updatedAt",
                        "plan",
                        "initials",
                        "features",
                        "hasPassword"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Profile"
        ],
        "summary": "profile.update",
        "description": "**Token scope:** `*`",
        "operationId": "profile_update",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fullName": {
                    "type": "string"
                  }
                },
                "required": [
                  "fullName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "fullName": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "initials": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email",
                        "fullName",
                        "id",
                        "initials"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Profile"
        ],
        "summary": "profile.destroy",
        "description": "**Token scope:** `*`",
        "operationId": "profile_destroy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/profile/password": {
      "patch": {
        "tags": [
          "Profile"
        ],
        "summary": "profile.update_password",
        "description": "**Token scope:** `*`",
        "operationId": "profile_update_password",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "type": "string"
                  },
                  "currentPassword": {
                    "type": "string"
                  },
                  "password_confirmation": {
                    "type": "string"
                  }
                },
                "required": [
                  "password",
                  "currentPassword",
                  "password_confirmation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.index",
        "description": "**Token scope:** `tags:read`",
        "operationId": "tags_index",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "created_at",
                "links_count",
                "campaigns_count",
                null
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "campaignsCount": {
                            "type": "number"
                          },
                          "linksCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "updatedAt",
                          "name",
                          "color",
                          "description"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.store",
        "description": "**Token scope:** `tags:write`",
        "operationId": "tags_store",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name",
                  "color"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaignsCount": {
                          "type": "number"
                        },
                        "linksCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "color",
                        "description"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.destroy_many",
        "description": "**Token scope:** `tags:delete`",
        "operationId": "tags_destroy_many",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.show",
        "description": "**Token scope:** `tags:read`",
        "operationId": "tags_show",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaignsCount": {
                          "type": "number"
                        },
                        "linksCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "color",
                        "description"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.update",
        "description": "**Token scope:** `tags:write`",
        "operationId": "tags_update",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "color": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaignsCount": {
                          "type": "number"
                        },
                        "linksCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "color",
                        "description"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.destroy",
        "description": "**Token scope:** `tags:delete`",
        "operationId": "tags_destroy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/summary": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.summary",
        "description": "**Token scope:** `tags:read`",
        "operationId": "tags_summary",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "campaignsCount": {
                          "type": "number"
                        },
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "linksCount": {
                          "type": "number"
                        },
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "campaignsCount",
                        "lastAccessedAt",
                        "linksCount",
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/links": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.links",
        "description": "**Token scope:** `tags:read`",
        "operationId": "tags_links",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "created_at",
                "visits_count",
                "short_code",
                "original_url",
                null
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "campaign": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            }
                          },
                          "isExpired": {
                            "type": "boolean"
                          },
                          "isPasswordProtected": {
                            "type": "boolean"
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isActive": {
                            "type": "boolean"
                          },
                          "lastAccessedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "originalUrl": {
                            "type": "string"
                          },
                          "scanStatus": {
                            "type": "string"
                          },
                          "scannedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shortCode": {
                            "type": "string"
                          },
                          "visitsCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {}
                            ]
                          },
                          "shortUrl": {
                            "type": "string"
                          },
                          "qrCode": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "design": {
                                    "type": "object",
                                    "properties": {
                                      "shape": {
                                        "enum": [
                                          "square",
                                          "circle"
                                        ]
                                      },
                                      "errorCorrectionLevel": {
                                        "enum": [
                                          "L",
                                          "M",
                                          "Q",
                                          "H"
                                        ]
                                      },
                                      "dots": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      "background": {
                                        "type": "object",
                                        "properties": {
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      },
                                      "cornersSquare": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded",
                                              "dot"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      },
                                      "cornersDot": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded",
                                              "dot"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "shape",
                                      "errorCorrectionLevel",
                                      "dots",
                                      "background",
                                      "cornersSquare",
                                      "cornersDot"
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "design"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "updatedAt",
                          "name",
                          "campaign",
                          "tags",
                          "isExpired",
                          "isPasswordProtected",
                          "expiresAt",
                          "isActive",
                          "lastAccessedAt",
                          "originalUrl",
                          "scanStatus",
                          "scannedAt",
                          "shortCode",
                          "visitsCount",
                          "shortUrl",
                          "qrCode"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/campaigns": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.campaigns",
        "description": "**Token scope:** `tags:read`",
        "operationId": "tags_campaigns",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "created_at",
                "links_count",
                "total_visits",
                null
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            }
                          },
                          "linksCount": {
                            "type": "number"
                          },
                          "totalVisits": {
                            "type": "number"
                          },
                          "qrVisits": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "updatedAt",
                          "name",
                          "description",
                          "tags"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/available-countries": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.available_countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_available_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/countries": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/browsers": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.browsers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_browsers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/os": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.os",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_os",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/device-types": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.device_types",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_device_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/referers": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.referers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_referers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/languages": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.languages",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_languages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/qr-visits": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.qr_visits",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_qr_visits",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        },
                        "percentage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits",
                        "percentage"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tags/{id}/analytics/visits-over-time": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "tags.visits_over_time",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "tags_visits_over_time",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "month",
                "day",
                null
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "granularity": {
                          "enum": [
                            "month",
                            "day"
                          ]
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "period": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "visits",
                              "period"
                            ]
                          }
                        }
                      },
                      "required": [
                        "granularity",
                        "points"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.index",
        "description": "**Token scope:** `campaigns:read`",
        "operationId": "campaigns_index",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "created_at",
                "links_count",
                "total_visits",
                "qr_visits",
                null
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            }
                          },
                          "linksCount": {
                            "type": "number"
                          },
                          "totalVisits": {
                            "type": "number"
                          },
                          "qrVisits": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "updatedAt",
                          "name",
                          "description",
                          "tags"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.store",
        "description": "**Token scope:** `campaigns:write`",
        "operationId": "campaigns_store",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tag_ids": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "linksCount": {
                          "type": "number"
                        },
                        "totalVisits": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "description",
                        "tags"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.destroy_many",
        "description": "**Token scope:** `campaigns:delete`",
        "operationId": "campaigns_destroy_many",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.show",
        "description": "**Token scope:** `campaigns:read`",
        "operationId": "campaigns_show",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "linksCount": {
                          "type": "number"
                        },
                        "totalVisits": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "description",
                        "tags"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.update",
        "description": "**Token scope:** `campaigns:write`",
        "operationId": "campaigns_update",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tag_ids": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "linksCount": {
                          "type": "number"
                        },
                        "totalVisits": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "description",
                        "tags"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.destroy",
        "description": "**Token scope:** `campaigns:delete`",
        "operationId": "campaigns_destroy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/available-countries": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.available_countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_available_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/countries": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/browsers": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.browsers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_browsers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/os": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.os",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_os",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/device-types": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.device_types",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_device_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/qr-visits": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.qr_visits",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_qr_visits",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        },
                        "percentage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits",
                        "percentage"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/visits-over-time": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.visits_over_time",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_visits_over_time",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "month",
                "day",
                null
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "granularity": {
                          "enum": [
                            "month",
                            "day"
                          ]
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "period": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "visits",
                              "period"
                            ]
                          }
                        }
                      },
                      "required": [
                        "granularity",
                        "points"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/referers": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.referers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_referers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/campaigns/{id}/analytics/languages": {
      "get": {
        "tags": [
          "Campaigns"
        ],
        "summary": "campaigns.languages",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "campaigns_languages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.index",
        "description": "**Token scope:** `links:read`",
        "operationId": "links_index",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "created_at",
                "visits_count",
                "short_code",
                "original_url",
                "expires_at",
                null
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_ids",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "expired",
                "not_expired",
                null
              ]
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "active",
                "inactive",
                null
              ]
            }
          },
          {
            "name": "scan_status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "clean",
                "pending",
                "flagged",
                null
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "has_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "campaign": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            }
                          },
                          "isExpired": {
                            "type": "boolean"
                          },
                          "isPasswordProtected": {
                            "type": "boolean"
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "isActive": {
                            "type": "boolean"
                          },
                          "lastAccessedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "originalUrl": {
                            "type": "string"
                          },
                          "scanStatus": {
                            "type": "string"
                          },
                          "scannedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shortCode": {
                            "type": "string"
                          },
                          "visitsCount": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {}
                            ]
                          },
                          "shortUrl": {
                            "type": "string"
                          },
                          "qrCode": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "design": {
                                    "type": "object",
                                    "properties": {
                                      "shape": {
                                        "enum": [
                                          "square",
                                          "circle"
                                        ]
                                      },
                                      "errorCorrectionLevel": {
                                        "enum": [
                                          "L",
                                          "M",
                                          "Q",
                                          "H"
                                        ]
                                      },
                                      "dots": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ]
                                      },
                                      "background": {
                                        "type": "object",
                                        "properties": {
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      },
                                      "cornersSquare": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded",
                                              "dot"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      },
                                      "cornersDot": {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "enum": [
                                              "square",
                                              "dots",
                                              "rounded",
                                              "classy",
                                              "classy-rounded",
                                              "extra-rounded",
                                              "dot"
                                            ]
                                          },
                                          "color": {
                                            "type": "string"
                                          },
                                          "gradient": {
                                            "type": "object",
                                            "properties": {
                                              "type": {
                                                "enum": [
                                                  "radial",
                                                  "linear"
                                                ]
                                              },
                                              "rotation": {
                                                "type": "number"
                                              },
                                              "colorStart": {
                                                "type": "string"
                                              },
                                              "colorEnd": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "type",
                                              "rotation",
                                              "colorStart",
                                              "colorEnd"
                                            ]
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "shape",
                                      "errorCorrectionLevel",
                                      "dots",
                                      "background",
                                      "cornersSquare",
                                      "cornersDot"
                                    ]
                                  }
                                },
                                "required": [
                                  "id",
                                  "design"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "updatedAt",
                          "name",
                          "campaign",
                          "tags",
                          "isExpired",
                          "isPasswordProtected",
                          "expiresAt",
                          "isActive",
                          "lastAccessedAt",
                          "originalUrl",
                          "scanStatus",
                          "scannedAt",
                          "shortCode",
                          "visitsCount",
                          "shortUrl",
                          "qrCode"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Links"
        ],
        "summary": "links.store",
        "description": "**Token scope:** `links:write`",
        "operationId": "links_store",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "original_url": {
                    "type": "string"
                  },
                  "tag_ids": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expires_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "original_url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "isExpired": {
                          "type": "boolean"
                        },
                        "isPasswordProtected": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "originalUrl": {
                          "type": "string"
                        },
                        "scanStatus": {
                          "type": "string"
                        },
                        "scannedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shortCode": {
                          "type": "string"
                        },
                        "visitsCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {}
                          ]
                        },
                        "shortUrl": {
                          "type": "string"
                        },
                        "qrCode": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "design": {
                                  "type": "object",
                                  "properties": {
                                    "shape": {
                                      "enum": [
                                        "square",
                                        "circle"
                                      ]
                                    },
                                    "errorCorrectionLevel": {
                                      "enum": [
                                        "L",
                                        "M",
                                        "Q",
                                        "H"
                                      ]
                                    },
                                    "dots": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ]
                                    },
                                    "background": {
                                      "type": "object",
                                      "properties": {
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersSquare": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersDot": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "required": [
                                    "shape",
                                    "errorCorrectionLevel",
                                    "dots",
                                    "background",
                                    "cornersSquare",
                                    "cornersDot"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "design"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "campaign",
                        "tags",
                        "isExpired",
                        "isPasswordProtected",
                        "expiresAt",
                        "isActive",
                        "lastAccessedAt",
                        "originalUrl",
                        "scanStatus",
                        "scannedAt",
                        "shortCode",
                        "visitsCount",
                        "shortUrl",
                        "qrCode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Links"
        ],
        "summary": "links.destroy_many",
        "description": "**Token scope:** `links:delete`",
        "operationId": "links_destroy_many",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/check-code": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.check_code",
        "description": "**Token scope:** `links:read`",
        "operationId": "links_check_code",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "available"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.show",
        "description": "**Token scope:** `links:read`",
        "operationId": "links_show",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "isExpired": {
                          "type": "boolean"
                        },
                        "isPasswordProtected": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "originalUrl": {
                          "type": "string"
                        },
                        "scanStatus": {
                          "type": "string"
                        },
                        "scannedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shortCode": {
                          "type": "string"
                        },
                        "visitsCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {}
                          ]
                        },
                        "shortUrl": {
                          "type": "string"
                        },
                        "qrCode": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "design": {
                                  "type": "object",
                                  "properties": {
                                    "shape": {
                                      "enum": [
                                        "square",
                                        "circle"
                                      ]
                                    },
                                    "errorCorrectionLevel": {
                                      "enum": [
                                        "L",
                                        "M",
                                        "Q",
                                        "H"
                                      ]
                                    },
                                    "dots": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ]
                                    },
                                    "background": {
                                      "type": "object",
                                      "properties": {
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersSquare": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersDot": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "required": [
                                    "shape",
                                    "errorCorrectionLevel",
                                    "dots",
                                    "background",
                                    "cornersSquare",
                                    "cornersDot"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "design"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "campaign",
                        "tags",
                        "isExpired",
                        "isPasswordProtected",
                        "expiresAt",
                        "isActive",
                        "lastAccessedAt",
                        "originalUrl",
                        "scanStatus",
                        "scannedAt",
                        "shortCode",
                        "visitsCount",
                        "shortUrl",
                        "qrCode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Links"
        ],
        "summary": "links.update",
        "description": "**Token scope:** `links:write`",
        "operationId": "links_update",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "original_url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "design": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "shape": {
                            "enum": [
                              "square",
                              "circle"
                            ]
                          },
                          "errorCorrectionLevel": {
                            "enum": [
                              "L",
                              "M",
                              "Q",
                              "H"
                            ]
                          },
                          "dots": {
                            "type": "object",
                            "properties": {
                              "color": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "gradient": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "enum": [
                                          "radial",
                                          "linear"
                                        ]
                                      },
                                      "rotation": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "number"
                                          }
                                        ]
                                      },
                                      "colorStart": {
                                        "type": "string"
                                      },
                                      "colorEnd": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "rotation",
                                      "colorStart",
                                      "colorEnd"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "type": {
                                "enum": [
                                  "square",
                                  "dots",
                                  "rounded",
                                  "classy",
                                  "classy-rounded",
                                  "extra-rounded"
                                ]
                              }
                            },
                            "required": [
                              "type"
                            ]
                          },
                          "background": {
                            "type": "object",
                            "properties": {
                              "color": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "gradient": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "enum": [
                                          "radial",
                                          "linear"
                                        ]
                                      },
                                      "rotation": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "number"
                                          }
                                        ]
                                      },
                                      "colorStart": {
                                        "type": "string"
                                      },
                                      "colorEnd": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "rotation",
                                      "colorStart",
                                      "colorEnd"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          "cornersSquare": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "enum": [
                                  "square",
                                  "dots",
                                  "rounded",
                                  "classy",
                                  "classy-rounded",
                                  "extra-rounded",
                                  "dot",
                                  null
                                ]
                              },
                              "color": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "gradient": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "enum": [
                                          "radial",
                                          "linear"
                                        ]
                                      },
                                      "rotation": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "number"
                                          }
                                        ]
                                      },
                                      "colorStart": {
                                        "type": "string"
                                      },
                                      "colorEnd": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "rotation",
                                      "colorStart",
                                      "colorEnd"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          },
                          "cornersDot": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "enum": [
                                  "square",
                                  "dots",
                                  "rounded",
                                  "classy",
                                  "classy-rounded",
                                  "extra-rounded",
                                  "dot",
                                  null
                                ]
                              },
                              "color": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "gradient": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "enum": [
                                          "radial",
                                          "linear"
                                        ]
                                      },
                                      "rotation": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "number"
                                          }
                                        ]
                                      },
                                      "colorStart": {
                                        "type": "string"
                                      },
                                      "colorEnd": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "rotation",
                                      "colorStart",
                                      "colorEnd"
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "required": [
                          "shape",
                          "errorCorrectionLevel",
                          "dots",
                          "background",
                          "cornersSquare",
                          "cornersDot"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "tag_ids": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_active": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "expires_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "campaign_id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "isExpired": {
                          "type": "boolean"
                        },
                        "isPasswordProtected": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "originalUrl": {
                          "type": "string"
                        },
                        "scanStatus": {
                          "type": "string"
                        },
                        "scannedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shortCode": {
                          "type": "string"
                        },
                        "visitsCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {}
                          ]
                        },
                        "shortUrl": {
                          "type": "string"
                        },
                        "qrCode": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "design": {
                                  "type": "object",
                                  "properties": {
                                    "shape": {
                                      "enum": [
                                        "square",
                                        "circle"
                                      ]
                                    },
                                    "errorCorrectionLevel": {
                                      "enum": [
                                        "L",
                                        "M",
                                        "Q",
                                        "H"
                                      ]
                                    },
                                    "dots": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ]
                                    },
                                    "background": {
                                      "type": "object",
                                      "properties": {
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersSquare": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersDot": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "required": [
                                    "shape",
                                    "errorCorrectionLevel",
                                    "dots",
                                    "background",
                                    "cornersSquare",
                                    "cornersDot"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "design"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "campaign",
                        "tags",
                        "isExpired",
                        "isPasswordProtected",
                        "expiresAt",
                        "isActive",
                        "lastAccessedAt",
                        "originalUrl",
                        "scanStatus",
                        "scannedAt",
                        "shortCode",
                        "visitsCount",
                        "shortUrl",
                        "qrCode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Links"
        ],
        "summary": "links.destroy",
        "description": "**Token scope:** `links:delete`",
        "operationId": "links_destroy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/rules": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.rules",
        "description": "**Token scope:** `links:read`",
        "operationId": "links_rules",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Links"
        ],
        "summary": "links.replace_rules",
        "description": "**Token scope:** `links:write`",
        "operationId": "links_replace_rules",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "enum": [
                            "geo",
                            "device",
                            "language"
                          ]
                        },
                        "condition": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "target_url": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "condition",
                        "target_url"
                      ]
                    }
                  }
                },
                "required": [
                  "rules"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/scan": {
      "post": {
        "tags": [
          "Links"
        ],
        "summary": "links.rescan",
        "description": "**Token scope:** `links:write`",
        "operationId": "links_rescan",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          }
                        },
                        "isExpired": {
                          "type": "boolean"
                        },
                        "isPasswordProtected": {
                          "type": "boolean"
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "originalUrl": {
                          "type": "string"
                        },
                        "scanStatus": {
                          "type": "string"
                        },
                        "scannedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "shortCode": {
                          "type": "string"
                        },
                        "visitsCount": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {}
                          ]
                        },
                        "shortUrl": {
                          "type": "string"
                        },
                        "qrCode": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "design": {
                                  "type": "object",
                                  "properties": {
                                    "shape": {
                                      "enum": [
                                        "square",
                                        "circle"
                                      ]
                                    },
                                    "errorCorrectionLevel": {
                                      "enum": [
                                        "L",
                                        "M",
                                        "Q",
                                        "H"
                                      ]
                                    },
                                    "dots": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ]
                                    },
                                    "background": {
                                      "type": "object",
                                      "properties": {
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersSquare": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    },
                                    "cornersDot": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "square",
                                            "dots",
                                            "rounded",
                                            "classy",
                                            "classy-rounded",
                                            "extra-rounded",
                                            "dot"
                                          ]
                                        },
                                        "color": {
                                          "type": "string"
                                        },
                                        "gradient": {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "enum": [
                                                "radial",
                                                "linear"
                                              ]
                                            },
                                            "rotation": {
                                              "type": "number"
                                            },
                                            "colorStart": {
                                              "type": "string"
                                            },
                                            "colorEnd": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "rotation",
                                            "colorStart",
                                            "colorEnd"
                                          ]
                                        }
                                      }
                                    }
                                  },
                                  "required": [
                                    "shape",
                                    "errorCorrectionLevel",
                                    "dots",
                                    "background",
                                    "cornersSquare",
                                    "cornersDot"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "design"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "updatedAt",
                        "name",
                        "campaign",
                        "tags",
                        "isExpired",
                        "isPasswordProtected",
                        "expiresAt",
                        "isActive",
                        "lastAccessedAt",
                        "originalUrl",
                        "scanStatus",
                        "scannedAt",
                        "shortCode",
                        "visitsCount",
                        "shortUrl",
                        "qrCode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/available-countries": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.available_countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_available_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/countries": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/browsers": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.browsers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_browsers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/os": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.os",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_os",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/device-types": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.device_types",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_device_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/utm-sources": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.utm_source",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_utm_source",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/utm-mediums": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.utm_medium",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_utm_medium",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/utm-campaigns": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.utm_campaign",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_utm_campaign",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/utm-terms": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.utm_term",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_utm_term",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/utm-contents": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.utm_content",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_utm_content",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/qr-visits": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.qr_visits",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_qr_visits",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        },
                        "percentage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits",
                        "percentage"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/visits-over-time": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.visits_over_time",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_visits_over_time",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "month",
                "day",
                null
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "granularity": {
                          "enum": [
                            "month",
                            "day"
                          ]
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "period": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "visits",
                              "period"
                            ]
                          }
                        }
                      },
                      "required": [
                        "granularity",
                        "points"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/referers": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.referers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_referers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/links/{id}/analytics/languages": {
      "get": {
        "tags": [
          "Links"
        ],
        "summary": "links.languages",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "links_languages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/available-countries": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.available_countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_available_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "countries"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/summary": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.summary",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_summary",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "lastAccessedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        },
                        "qrVisitsPercentage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "lastAccessedAt",
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits",
                        "qrVisitsPercentage"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/visits-comparison": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.visits_comparison",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_visits_comparison",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "compare_with",
            "in": "query",
            "required": true,
            "schema": {
              "enum": [
                "yesterday",
                "last_week",
                "last_month"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "current": {
                          "type": "object",
                          "properties": {
                            "visits": {
                              "type": "number"
                            },
                            "qrVisits": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "visits",
                            "qrVisits"
                          ]
                        },
                        "previous": {
                          "type": "object",
                          "properties": {
                            "visits": {
                              "type": "number"
                            },
                            "qrVisits": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "visits",
                            "qrVisits"
                          ]
                        },
                        "visitsDelta": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "qrVisitsDelta": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "current",
                        "previous",
                        "visitsDelta",
                        "qrVisitsDelta"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/visits-over-time": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.visits_over_time",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_visits_over_time",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "month",
                "day",
                null
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "granularity": {
                          "enum": [
                            "month",
                            "day"
                          ]
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "period": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "visits",
                              "period"
                            ]
                          }
                        }
                      },
                      "required": [
                        "granularity",
                        "points"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/countries": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.countries",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_countries",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/browsers": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.browsers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_browsers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/os": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.os",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_os",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/device-types": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.device_types",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_device_types",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/referers": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.referers",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_referers",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/languages": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.languages",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_languages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "visits": {
                                "type": "number"
                              },
                              "key": {
                                "type": "string"
                              },
                              "percentage": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "visits",
                              "key",
                              "percentage"
                            ]
                          }
                        },
                        "unknownVisits": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "stats",
                        "unknownVisits"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/qr-visits": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "summary": "analytics.qr_visits",
        "description": "**Token scope:** `analytics:read`",
        "operationId": "analytics_qr_visits",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "countries",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "coming_from_qr_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "totalVisits": {
                          "type": "number"
                        },
                        "uniqueVisitors": {
                          "type": "number"
                        },
                        "qrVisits": {
                          "type": "number"
                        },
                        "percentage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "totalVisits",
                        "uniqueVisitors",
                        "qrVisits",
                        "percentage"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-tokens": {
      "get": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.index",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_index",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "name",
                "created_at",
                "expires_at",
                "last_used_at",
                null
              ]
            }
          },
          {
            "name": "sort_direction",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc",
                null
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "all",
                "expired",
                "active",
                null
              ]
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "links:read",
                "links:write",
                "links:delete",
                "campaigns:read",
                "campaigns:write",
                "campaigns:delete",
                "tags:read",
                "tags:write",
                "tags:delete",
                "analytics:read",
                "profile:read",
                null
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "enum": [
                              "expired",
                              "active"
                            ]
                          },
                          "lastUsedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "createdAt",
                          "id",
                          "name",
                          "expiresAt",
                          "status",
                          "lastUsedAt",
                          "scopes"
                        ]
                      }
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number"
                        },
                        "perPage": {
                          "type": "number"
                        },
                        "currentPage": {
                          "type": "number"
                        },
                        "lastPage": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "total",
                        "perPage",
                        "currentPage",
                        "lastPage"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.store",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_store",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "enum": [
                        "links:read",
                        "links:write",
                        "links:delete",
                        "campaigns:read",
                        "campaigns:write",
                        "campaigns:delete",
                        "tags:read",
                        "tags:write",
                        "tags:delete",
                        "analytics:read",
                        "profile:read"
                      ]
                    }
                  },
                  "expiry": {
                    "enum": [
                      "30d",
                      "60d",
                      "90d",
                      "365d",
                      "never"
                    ]
                  }
                },
                "required": [
                  "name",
                  "scopes",
                  "expiry"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "enum": [
                            "expired",
                            "active"
                          ]
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "token": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "expiresAt",
                        "status",
                        "lastUsedAt",
                        "scopes",
                        "token"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.destroy_many",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_destroy_many",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "deleted": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "deleted"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-tokens/{id}": {
      "patch": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.update",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_update",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scopes": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "enum": [
                            "links:read",
                            "links:write",
                            "links:delete",
                            "campaigns:read",
                            "campaigns:write",
                            "campaigns:delete",
                            "tags:read",
                            "tags:write",
                            "tags:delete",
                            "analytics:read",
                            "profile:read"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "enum": [
                            "expired",
                            "active"
                          ]
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "expiresAt",
                        "status",
                        "lastUsedAt",
                        "scopes"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.destroy",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_destroy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-tokens/{id}/reroll": {
      "post": {
        "tags": [
          "Api Tokens"
        ],
        "summary": "api_tokens.reroll",
        "description": "**Token scope:** `*`",
        "operationId": "api_tokens_reroll",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "createdAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiresAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "status": {
                          "enum": [
                            "expired",
                            "active"
                          ]
                        },
                        "lastUsedAt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "token": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "createdAt",
                        "id",
                        "name",
                        "expiresAt",
                        "status",
                        "lastUsedAt",
                        "scopes",
                        "token"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (scope / plan)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Personal API token (`Authorization: Bearer oat_…`)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "code": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
