{
  "openapi": "3.0.3",
  "info": {
    "title": "Tapmy.link API",
    "version": "1.0.0",
    "description": "Create and edit link-in-bio pages on their own subdomains. Human-readable documentation: https://tapmy.link/documentation/agents (Markdown: https://tapmy.link/documentation/agents.md).",
    "termsOfService": "https://tapmy.link/legal/terms"
  },
  "servers": [
    {
      "url": "https://tapmy.link"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "A key that looks like tapmy_sk_… — returned by POST /api/agent/pages or created in the dashboard."
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "retryAfter": {
            "type": "integer"
          }
        }
      },
      "Block": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "link"
                ]
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "url": {
                "type": "string"
              },
              "note": {
                "type": "string",
                "maxLength": 160
              },
              "image": {
                "nullable": true,
                "type": "string",
                "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
              },
              "imageFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "badge": {
                "nullable": true,
                "type": "string",
                "maxLength": 20
              },
              "featured": {
                "type": "boolean"
              },
              "adult": {
                "type": "boolean"
              },
              "pulse": {
                "type": "boolean"
              },
              "path": {
                "nullable": true,
                "type": "string",
                "maxLength": 40
              },
              "apps": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "ios": {
                    "nullable": true,
                    "type": "string"
                  },
                  "android": {
                    "nullable": true,
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "label",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "social"
                ]
              },
              "platform": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "url": {
                "type": "string"
              },
              "counter": {
                "nullable": true,
                "type": "string",
                "maxLength": 20
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "platform",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "socialRow"
                ]
              },
              "items": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "platform": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "platform",
                    "url"
                  ]
                }
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "items"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "embed"
                ]
              },
              "provider": {
                "type": "string",
                "enum": [
                  "youtube",
                  "spotify",
                  "soundcloud",
                  "applemusic",
                  "tiktok"
                ]
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string",
                "maxLength": 120
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "provider",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "messenger"
                ]
              },
              "platform": {
                "type": "string",
                "enum": [
                  "telegram",
                  "whatsapp",
                  "viber"
                ]
              },
              "handle": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "label": {
                "type": "string",
                "maxLength": 80
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "platform",
              "handle"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ]
              },
              "content": {
                "type": "string",
                "maxLength": 600
              },
              "variant": {
                "type": "string",
                "enum": [
                  "heading",
                  "paragraph"
                ]
              }
            },
            "required": [
              "id",
              "order",
              "visible",
              "type",
              "content"
            ]
          }
        ]
      },
      "AgentBlock": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "link"
                ]
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "url": {
                "type": "string"
              },
              "note": {
                "type": "string",
                "maxLength": 160
              },
              "image": {
                "nullable": true,
                "type": "string",
                "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
              },
              "imageFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "badge": {
                "nullable": true,
                "type": "string",
                "maxLength": 20
              },
              "featured": {
                "type": "boolean"
              },
              "adult": {
                "type": "boolean"
              },
              "pulse": {
                "type": "boolean"
              },
              "path": {
                "nullable": true,
                "type": "string",
                "maxLength": 40
              },
              "apps": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "ios": {
                    "nullable": true,
                    "type": "string"
                  },
                  "android": {
                    "nullable": true,
                    "type": "string"
                  }
                }
              }
            },
            "required": [
              "type",
              "label",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "social"
                ]
              },
              "platform": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "url": {
                "type": "string"
              },
              "counter": {
                "nullable": true,
                "type": "string",
                "maxLength": 20
              }
            },
            "required": [
              "type",
              "platform",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "socialRow"
                ]
              },
              "items": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "platform": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "platform",
                    "url"
                  ]
                }
              }
            },
            "required": [
              "type",
              "items"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "embed"
                ]
              },
              "provider": {
                "type": "string",
                "enum": [
                  "youtube",
                  "spotify",
                  "soundcloud",
                  "applemusic",
                  "tiktok"
                ]
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string",
                "maxLength": 120
              }
            },
            "required": [
              "type",
              "provider",
              "url"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "messenger"
                ]
              },
              "platform": {
                "type": "string",
                "enum": [
                  "telegram",
                  "whatsapp",
                  "viber"
                ]
              },
              "handle": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "label": {
                "type": "string",
                "maxLength": 80
              }
            },
            "required": [
              "type",
              "platform",
              "handle"
            ]
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "order": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999
              },
              "visible": {
                "type": "boolean"
              },
              "showFrom": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "showUntil": {
                "nullable": true,
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ]
              },
              "content": {
                "type": "string",
                "maxLength": 600
              },
              "variant": {
                "type": "string",
                "enum": [
                  "heading",
                  "paragraph"
                ]
              }
            },
            "required": [
              "type",
              "content"
            ]
          }
        ]
      },
      "AgentPageRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 5
          },
          "page": {
            "type": "object",
            "properties": {
              "displayName": {
                "type": "string",
                "maxLength": 60
              },
              "bio": {
                "type": "string",
                "maxLength": 300
              },
              "avatarFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "templateId": {
                "type": "string",
                "enum": [
                  "editorial",
                  "mono",
                  "aurora",
                  "zine",
                  "photo",
                  "brutal",
                  "whisper",
                  "y2k",
                  "noir",
                  "showcase"
                ]
              },
              "layout": {
                "type": "string",
                "enum": [
                  "list",
                  "grid"
                ]
              },
              "headerAlign": {
                "nullable": true,
                "type": "string",
                "enum": [
                  "left",
                  "center",
                  "right"
                ]
              },
              "pageLocale": {
                "type": "string",
                "minLength": 2,
                "maxLength": 5
              },
              "utm": {
                "type": "boolean"
              },
              "theme": {
                "type": "object",
                "properties": {
                  "accent": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "overlay": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                }
              },
              "blocks": {
                "maxItems": 80,
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "link"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "url": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string",
                          "maxLength": 160
                        },
                        "image": {
                          "nullable": true,
                          "type": "string",
                          "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
                        },
                        "imageFocus": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "y": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        },
                        "badge": {
                          "nullable": true,
                          "type": "string",
                          "maxLength": 20
                        },
                        "featured": {
                          "type": "boolean"
                        },
                        "adult": {
                          "type": "boolean"
                        },
                        "pulse": {
                          "type": "boolean"
                        },
                        "path": {
                          "nullable": true,
                          "type": "string",
                          "maxLength": 40
                        },
                        "apps": {
                          "nullable": true,
                          "type": "object",
                          "properties": {
                            "ios": {
                              "nullable": true,
                              "type": "string"
                            },
                            "android": {
                              "nullable": true,
                              "type": "string"
                            }
                          }
                        }
                      },
                      "required": [
                        "type",
                        "label",
                        "url"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "social"
                          ]
                        },
                        "platform": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "url": {
                          "type": "string"
                        },
                        "counter": {
                          "nullable": true,
                          "type": "string",
                          "maxLength": 20
                        }
                      },
                      "required": [
                        "type",
                        "platform",
                        "url"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "socialRow"
                          ]
                        },
                        "items": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "platform": {
                                "type": "string",
                                "maxLength": 40
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "platform",
                              "url"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type",
                        "items"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "embed"
                          ]
                        },
                        "provider": {
                          "type": "string",
                          "enum": [
                            "youtube",
                            "spotify",
                            "soundcloud",
                            "applemusic",
                            "tiktok"
                          ]
                        },
                        "url": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120
                        }
                      },
                      "required": [
                        "type",
                        "provider",
                        "url"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "messenger"
                          ]
                        },
                        "platform": {
                          "type": "string",
                          "enum": [
                            "telegram",
                            "whatsapp",
                            "viber"
                          ]
                        },
                        "handle": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 80
                        }
                      },
                      "required": [
                        "type",
                        "platform",
                        "handle"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 40
                        },
                        "order": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 999
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "showFrom": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "showUntil": {
                          "nullable": true,
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text"
                          ]
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 600
                        },
                        "variant": {
                          "type": "string",
                          "enum": [
                            "heading",
                            "paragraph"
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "content"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "avatarUrl": {
            "type": "string"
          },
          "importFromUrl": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "publish": {
            "type": "boolean"
          }
        },
        "required": [
          "username"
        ]
      },
      "ProfileUpdate": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "maxLength": 60
          },
          "avatar": {
            "nullable": true,
            "type": "string",
            "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
          },
          "avatarFocus": {
            "nullable": true,
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "bio": {
            "type": "string",
            "maxLength": 300
          },
          "templateId": {
            "type": "string",
            "enum": [
              "editorial",
              "mono",
              "aurora",
              "zine",
              "photo",
              "brutal",
              "whisper",
              "y2k",
              "noir",
              "showcase"
            ]
          },
          "layout": {
            "type": "string",
            "enum": [
              "list",
              "grid"
            ]
          },
          "headerAlign": {
            "nullable": true,
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ]
          },
          "pageLocale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 5
          },
          "isPublished": {
            "type": "boolean"
          },
          "utm": {
            "type": "boolean"
          },
          "theme": {
            "default": {},
            "type": "object",
            "properties": {
              "accent": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "backgroundImage": {
                "nullable": true,
                "type": "string",
                "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
              },
              "backgroundFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "overlay": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "blocks": {
            "maxItems": 80,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "link"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "url": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 160
                    },
                    "image": {
                      "nullable": true,
                      "type": "string",
                      "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
                    },
                    "imageFocus": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "badge": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "adult": {
                      "type": "boolean"
                    },
                    "pulse": {
                      "type": "boolean"
                    },
                    "path": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 40
                    },
                    "apps": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "ios": {
                          "nullable": true,
                          "type": "string"
                        },
                        "android": {
                          "nullable": true,
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "label",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "social"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "url": {
                      "type": "string"
                    },
                    "counter": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "platform",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "socialRow"
                      ]
                    },
                    "items": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string",
                            "maxLength": 40
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "platform",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "embed"
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "spotify",
                        "soundcloud",
                        "applemusic",
                        "tiktok"
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "provider",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "messenger"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "enum": [
                        "telegram",
                        "whatsapp",
                        "viber"
                      ]
                    },
                    "handle": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "platform",
                    "handle"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "content": {
                      "type": "string",
                      "maxLength": 600
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "heading",
                        "paragraph"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "content"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "displayName",
          "bio",
          "templateId",
          "layout",
          "pageLocale",
          "isPublished",
          "blocks"
        ]
      },
      "ProfilePatch": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "maxLength": 60
          },
          "avatar": {
            "nullable": true,
            "type": "string",
            "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
          },
          "avatarFocus": {
            "nullable": true,
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "bio": {
            "type": "string",
            "maxLength": 300
          },
          "templateId": {
            "type": "string",
            "enum": [
              "editorial",
              "mono",
              "aurora",
              "zine",
              "photo",
              "brutal",
              "whisper",
              "y2k",
              "noir",
              "showcase"
            ]
          },
          "layout": {
            "type": "string",
            "enum": [
              "list",
              "grid"
            ]
          },
          "headerAlign": {
            "nullable": true,
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ]
          },
          "pageLocale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 5
          },
          "isPublished": {
            "type": "boolean"
          },
          "utm": {
            "type": "boolean"
          },
          "theme": {
            "type": "object",
            "properties": {
              "accent": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "backgroundImage": {
                "nullable": true,
                "type": "string",
                "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
              },
              "backgroundFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "overlay": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "blocks": {
            "maxItems": 80,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "link"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "url": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 160
                    },
                    "image": {
                      "nullable": true,
                      "type": "string",
                      "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
                    },
                    "imageFocus": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "badge": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "adult": {
                      "type": "boolean"
                    },
                    "pulse": {
                      "type": "boolean"
                    },
                    "path": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 40
                    },
                    "apps": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "ios": {
                          "nullable": true,
                          "type": "string"
                        },
                        "android": {
                          "nullable": true,
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "label",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "social"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "url": {
                      "type": "string"
                    },
                    "counter": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    }
                  },
                  "required": [
                    "type",
                    "platform",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "socialRow"
                      ]
                    },
                    "items": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string",
                            "maxLength": 40
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "platform",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "embed"
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "spotify",
                        "soundcloud",
                        "applemusic",
                        "tiktok"
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "required": [
                    "type",
                    "provider",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "messenger"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "enum": [
                        "telegram",
                        "whatsapp",
                        "viber"
                      ]
                    },
                    "handle": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "required": [
                    "type",
                    "platform",
                    "handle"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "content": {
                      "type": "string",
                      "maxLength": 600
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "heading",
                        "paragraph"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "content"
                  ]
                }
              ]
            }
          }
        }
      },
      "CreateProfile": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "enum": [
              "editorial",
              "mono",
              "aurora",
              "zine",
              "photo",
              "brutal",
              "whisper",
              "y2k",
              "noir",
              "showcase"
            ]
          }
        },
        "required": [
          "username"
        ]
      },
      "UploadByUrl": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "kind": {
            "default": "card",
            "type": "string",
            "enum": [
              "avatar",
              "background",
              "card"
            ]
          }
        },
        "required": [
          "url"
        ]
      },
      "ClaimRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200
          },
          "locale": {
            "type": "string",
            "minLength": 2,
            "maxLength": 5
          }
        },
        "required": [
          "email",
          "password"
        ]
      },
      "ApiKeyCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "required": [
          "name"
        ]
      },
      "EditableProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "avatar": {
            "nullable": true,
            "type": "string"
          },
          "avatarFocus": {
            "nullable": true,
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "templateId": {
            "type": "string",
            "enum": [
              "editorial",
              "mono",
              "aurora",
              "zine",
              "photo",
              "brutal",
              "whisper",
              "y2k",
              "noir",
              "showcase"
            ]
          },
          "layout": {
            "type": "string",
            "enum": [
              "list",
              "grid"
            ]
          },
          "headerAlign": {
            "nullable": true,
            "type": "string",
            "enum": [
              "left",
              "center",
              "right"
            ]
          },
          "theme": {
            "type": "object",
            "properties": {
              "accent": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "backgroundImage": {
                "nullable": true,
                "type": "string",
                "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
              },
              "backgroundFocus": {
                "nullable": true,
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "y": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "x",
                  "y"
                ]
              },
              "overlay": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            }
          },
          "blocks": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "link"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "url": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 160
                    },
                    "image": {
                      "nullable": true,
                      "type": "string",
                      "pattern": "^(avatar|background|card)\\/[0-9a-f]{24}\\/[0-9a-f-]{36}\\.avif$"
                    },
                    "imageFocus": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "y": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "x",
                        "y"
                      ]
                    },
                    "badge": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "adult": {
                      "type": "boolean"
                    },
                    "pulse": {
                      "type": "boolean"
                    },
                    "path": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 40
                    },
                    "apps": {
                      "nullable": true,
                      "type": "object",
                      "properties": {
                        "ios": {
                          "nullable": true,
                          "type": "string"
                        },
                        "android": {
                          "nullable": true,
                          "type": "string"
                        }
                      }
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "label",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "social"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "url": {
                      "type": "string"
                    },
                    "counter": {
                      "nullable": true,
                      "type": "string",
                      "maxLength": 20
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "platform",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "socialRow"
                      ]
                    },
                    "items": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "platform": {
                            "type": "string",
                            "maxLength": 40
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "platform",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "items"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "embed"
                      ]
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "youtube",
                        "spotify",
                        "soundcloud",
                        "applemusic",
                        "tiktok"
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 120
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "provider",
                    "url"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "messenger"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "enum": [
                        "telegram",
                        "whatsapp",
                        "viber"
                      ]
                    },
                    "handle": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 60
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "platform",
                    "handle"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "order": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 999
                    },
                    "visible": {
                      "type": "boolean"
                    },
                    "showFrom": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "showUntil": {
                      "nullable": true,
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "text"
                      ]
                    },
                    "content": {
                      "type": "string",
                      "maxLength": 600
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "heading",
                        "paragraph"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "order",
                    "visible",
                    "type",
                    "content"
                  ]
                }
              ]
            }
          },
          "pageLocale": {
            "type": "string"
          },
          "isPublished": {
            "type": "boolean"
          },
          "utm": {
            "type": "boolean"
          },
          "moderationStatus": {
            "type": "string",
            "enum": [
              "ok",
              "review",
              "banned"
            ]
          },
          "updatedAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "displayName",
          "bio",
          "avatar",
          "templateId",
          "layout",
          "headerAlign",
          "theme",
          "blocks",
          "pageLocale",
          "isPublished",
          "utm",
          "moderationStatus",
          "updatedAt",
          "createdAt"
        ]
      },
      "AgentPageResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "provisional": {
                "type": "boolean"
              },
              "email": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "apiKey": {
            "type": "string",
            "description": "Only when an account was created in this call. Shown once."
          },
          "claimUrl": {
            "type": "string",
            "description": "Only for a provisional account."
          },
          "claimExpiresAt": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/EditableProfile"
          },
          "url": {
            "type": "string"
          },
          "editUrl": {
            "type": "string"
          },
          "handoverMessage": {
            "type": "string"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "next": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Stats": {
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "views7": {
            "type": "integer"
          },
          "views30": {
            "type": "integer"
          },
          "uniques7": {
            "type": "integer"
          },
          "uniques30": {
            "type": "integer"
          },
          "clicks7": {
            "type": "integer"
          },
          "clicks30": {
            "type": "integer"
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string"
                },
                "views": {
                  "type": "integer"
                }
              }
            }
          },
          "clicksByBlock": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/username/check": {
      "get": {
        "summary": "Is this name free?",
        "operationId": "checkUsername",
        "parameters": [
          {
            "name": "u",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "free | taken (+suggestions) | invalid (+reason) | unknown",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "username": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "suggestions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "throttled"
          }
        }
      }
    },
    "/api/agent/pages": {
      "post": {
        "summary": "Create a page (and an account, if needed) in one call",
        "operationId": "createAgentPage",
        "description": "Without a bearer key: creates an account — provisional when `email` is absent — and returns its key. With a key: adds a page to that account. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {},
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPageRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentPageResponse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_fields, bad_path or a username rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "limit_reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "username_taken or email_taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/pages/validate": {
      "post": {
        "summary": "Dry run of createAgentPage",
        "operationId": "validateAgentPage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ ok, errors[] }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "path": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "suggestions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/me": {
      "get": {
        "summary": "The authenticated account, its pages and remaining slots",
        "operationId": "whoami",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/claim-link": {
      "post": {
        "summary": "Mint a fresh claim link for a provisional account",
        "operationId": "claimLink",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ claimUrl, claimExpiresAt }"
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "already_claimed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/claim/{token}": {
      "get": {
        "summary": "Claim status",
        "operationId": "claimStatus",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ status: pending|claimed|expired|invalid, usernames[] }"
          }
        }
      },
      "post": {
        "summary": "Claim the account (set e-mail and password)",
        "operationId": "claimAccount",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClaimRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Claimed; a session cookie is set"
          },
          "400": {
            "description": "claim_invalid / claim_expired / invalid_fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "claim_used / email_taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/profiles": {
      "get": {
        "summary": "All pages of the account",
        "operationId": "listProfiles",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ profiles: EditableProfile[], max }"
          }
        }
      },
      "post": {
        "summary": "Claim another subdomain on the account",
        "operationId": "createProfile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProfile"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{ profile }"
          },
          "403": {
            "description": "limit_reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "username_taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/profiles/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ],
      "get": {
        "summary": "One page",
        "operationId": "getProfile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ profile }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profile": {
                      "$ref": "#/components/schemas/EditableProfile"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Change any subset of fields (blocks replaces the list)",
        "operationId": "patchProfile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfilePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ ok, savedAt, profile }"
          },
          "400": {
            "description": "invalid_fields / bad_path",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "banned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Replace every editable field",
        "operationId": "putProfile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ ok, savedAt, profile }"
          }
        }
      },
      "delete": {
        "summary": "Delete the page; the name is parked",
        "operationId": "deleteProfile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ ok }"
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/profiles/{id}/stats": {
      "get": {
        "summary": "Views, uniques, taps, daily series",
        "operationId": "profileStats",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          }
        }
      }
    },
    "/api/upload": {
      "post": {
        "summary": "Store an image; returns a storage key",
        "operationId": "upload",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadByUrl"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "avatar",
                      "background",
                      "card"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ key, bytes, width, height, lqip }"
          },
          "400": {
            "description": "bad_url / blocked / not_image / processing_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/import/page": {
      "post": {
        "summary": "Links found on a public link page",
        "operationId": "importPage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ title, links[], avatar }"
          },
          "400": {
            "description": "bad_url / blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "quota",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "unreachable / nothing_found / js_only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/import/instagram": {
      "post": {
        "summary": "Photo, name and bio from an Instagram handle",
        "operationId": "importInstagram",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "handle"
                ],
                "properties": {
                  "handle": {
                    "type": "string"
                  },
                  "withAvatar": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "{ profile, avatarKey }"
          },
          "429": {
            "description": "quota",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "not_found / slow / unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/account": {
      "get": {
        "summary": "The account",
        "operationId": "getAccount",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ account }"
          }
        }
      },
      "patch": {
        "summary": "Change interface language or password",
        "operationId": "patchAccount",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "{ ok }"
          }
        }
      }
    },
    "/api/account/export": {
      "get": {
        "summary": "Everything stored about the account, as JSON",
        "operationId": "exportAccount",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON file"
          }
        }
      }
    },
    "/api/keys": {
      "get": {
        "summary": "List API keys (browser session only)",
        "operationId": "listKeys",
        "responses": {
          "200": {
            "description": "{ keys[] }"
          },
          "403": {
            "description": "forbidden_via_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create an API key (browser session only)",
        "operationId": "createKey",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{ key, summary }"
          },
          "403": {
            "description": "forbidden_via_key / limit_reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/keys/{id}": {
      "delete": {
        "summary": "Revoke a key (browser session only)",
        "operationId": "revokeKey",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ ok }"
          },
          "403": {
            "description": "forbidden_via_key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  }
}