{
  "openapi": "3.1.0",
  "info": {
    "title": "dynm.link API",
    "version": "1.0.0"
  },
  "components": {
    "schemas": {},
    "parameters": {}
  },
  "paths": {
    "/check-username": {
      "get": {
        "operationId": "get_CheckUsername",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "username",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Username availability result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "available"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks": {
      "post": {
        "operationId": "post_MicrolinkCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "redirect"
                        ]
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "web": {
                            "type": "string",
                            "format": "uri"
                          },
                          "rules": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "when": {
                                  "type": "array",
                                  "items": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "eq"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "value": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "number"
                                              }
                                            ]
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "in"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "values": {
                                            "type": "array",
                                            "items": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            },
                                            "minItems": 1
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "values"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "lt"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "value": {
                                            "type": "number"
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "lte"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "value": {
                                            "type": "number"
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "gt"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "value": {
                                            "type": "number"
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "value"
                                        ]
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "op": {
                                            "type": "string",
                                            "enum": [
                                              "gte"
                                            ]
                                          },
                                          "field": {
                                            "type": "string",
                                            "enum": [
                                              "platform",
                                              "country",
                                              "now"
                                            ]
                                          },
                                          "value": {
                                            "type": "number"
                                          },
                                          "negate": {
                                            "type": "boolean"
                                          }
                                        },
                                        "required": [
                                          "op",
                                          "field",
                                          "value"
                                        ]
                                      }
                                    ]
                                  }
                                },
                                "to": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "when",
                                "to"
                              ]
                            }
                          }
                        },
                        "required": [
                          "web"
                        ]
                      },
                      "host": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "content"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "text"
                        ]
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "body": {
                            "type": "string"
                          },
                          "markdown": {
                            "type": "boolean",
                            "default": false
                          }
                        },
                        "required": [
                          "body"
                        ]
                      },
                      "host": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "content"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "bio"
                        ]
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "headline": {
                            "type": "string"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri"
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "icon": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ]
                            }
                          }
                        },
                        "required": [
                          "name",
                          "links"
                        ]
                      },
                      "host": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "content"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "file"
                        ]
                      },
                      "content": {
                        "type": "object",
                        "properties": {
                          "r2Key": {
                            "type": "string"
                          },
                          "filename": {
                            "type": "string"
                          },
                          "size": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "mime": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "r2Key",
                          "filename",
                          "size",
                          "mime"
                        ]
                      },
                      "host": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string",
                        "maxLength": 64
                      },
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "content"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Microlink created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "url",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (self-redirect, invalid slug, disallowed type, or non-apex host for unauthenticated caller)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "self-redirect",
                        "invalid-slug",
                        "type-not-allowed",
                        "apex-only"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Signed-in Free user hit the plan's link limit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "tier-limit"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Requested slug is taken",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "slug-taken"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Referenced file exceeds the caller’s max file size",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "file-too-large"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Per-IP create rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "rate-limit"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get_MicrolinkList",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of microlinks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "host": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "content": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "web": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "when": {
                                          "type": "array",
                                          "items": {
                                            "oneOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string"
                                                      },
                                                      {
                                                        "type": "number"
                                                      }
                                                    ]
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "value"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "in"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "values": {
                                                    "type": "array",
                                                    "items": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        }
                                                      ]
                                                    },
                                                    "minItems": 1
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "values"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "lt"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "number"
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "value"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "lte"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "number"
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "value"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "gt"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "number"
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "value"
                                                ]
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "gte"
                                                    ]
                                                  },
                                                  "field": {
                                                    "type": "string",
                                                    "enum": [
                                                      "platform",
                                                      "country",
                                                      "now"
                                                    ]
                                                  },
                                                  "value": {
                                                    "type": "number"
                                                  },
                                                  "negate": {
                                                    "type": "boolean"
                                                  }
                                                },
                                                "required": [
                                                  "op",
                                                  "field",
                                                  "value"
                                                ]
                                              }
                                            ]
                                          }
                                        },
                                        "to": {
                                          "type": "string",
                                          "format": "uri"
                                        }
                                      },
                                      "required": [
                                        "when",
                                        "to"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "web"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "body": {
                                    "type": "string"
                                  },
                                  "markdown": {
                                    "type": "boolean",
                                    "default": false
                                  }
                                },
                                "required": [
                                  "body"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "headline": {
                                    "type": "string"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "links": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "label": {
                                          "type": "string"
                                        },
                                        "url": {
                                          "type": "string",
                                          "format": "uri"
                                        },
                                        "icon": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "label",
                                        "url"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "links"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "r2Key": {
                                    "type": "string"
                                  },
                                  "filename": {
                                    "type": "string"
                                  },
                                  "size": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "mime": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "r2Key",
                                  "filename",
                                  "size",
                                  "mime"
                                ]
                              }
                            ]
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "thumbnail": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiresAt": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "number"
                          },
                          "updatedAt": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "host",
                          "type",
                          "content",
                          "title",
                          "description",
                          "thumbnail",
                          "expiresAt",
                          "createdAt",
                          "updatedAt"
                        ]
                      }
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/resolve": {
      "get": {
        "operationId": "get_MicrolinkResolve",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "hostname",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "string",
                "null"
              ]
            },
            "required": false,
            "name": "slug",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Resolved microlink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "host": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "web": {
                              "type": "string",
                              "format": "uri"
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "when": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "eq"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "in"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "values": {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  }
                                                ]
                                              },
                                              "minItems": 1
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "values"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "when",
                                  "to"
                                ]
                              }
                            }
                          },
                          "required": [
                            "web"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "body": {
                              "type": "string"
                            },
                            "markdown": {
                              "type": "boolean",
                              "default": false
                            }
                          },
                          "required": [
                            "body"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "headline": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "icon": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "label",
                                  "url"
                                ]
                              }
                            }
                          },
                          "required": [
                            "name",
                            "links"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "r2Key": {
                              "type": "string"
                            },
                            "filename": {
                              "type": "string"
                            },
                            "size": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "mime": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "r2Key",
                            "filename",
                            "size",
                            "mime"
                          ]
                        }
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "thumbnail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "host",
                    "type",
                    "content",
                    "title",
                    "description",
                    "thumbnail",
                    "expiresAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found (unknown hostname or slug)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "410": {
            "description": "Microlink has expired",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/slug-available": {
      "get": {
        "operationId": "get_MicrolinkSlugAvailable",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "host",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "slug",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Slug availability result",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "available"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "available": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "code": {
                          "type": "string",
                          "enum": [
                            "invalid-format",
                            "reserved",
                            "domain-forbidden",
                            "taken"
                          ]
                        }
                      },
                      "required": [
                        "available",
                        "code"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/stats/batch": {
      "post": {
        "operationId": "post_MicrolinkStatsBatch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "7-day view series per owned link (ids the caller does not own are omitted)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "views": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "series": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "day": {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "views": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "day",
                                "views"
                              ]
                            }
                          }
                        },
                        "required": [
                          "id",
                          "views",
                          "series"
                        ]
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/{id}": {
      "get": {
        "operationId": "get_MicrolinkGet",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Microlink details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "host": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "web": {
                              "type": "string",
                              "format": "uri"
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "when": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "eq"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "in"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "values": {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  }
                                                ]
                                              },
                                              "minItems": 1
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "values"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "when",
                                  "to"
                                ]
                              }
                            }
                          },
                          "required": [
                            "web"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "body": {
                              "type": "string"
                            },
                            "markdown": {
                              "type": "boolean",
                              "default": false
                            }
                          },
                          "required": [
                            "body"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "headline": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "icon": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "label",
                                  "url"
                                ]
                              }
                            }
                          },
                          "required": [
                            "name",
                            "links"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "r2Key": {
                              "type": "string"
                            },
                            "filename": {
                              "type": "string"
                            },
                            "size": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "mime": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "r2Key",
                            "filename",
                            "size",
                            "mime"
                          ]
                        }
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "thumbnail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "host",
                    "type",
                    "content",
                    "title",
                    "description",
                    "thumbnail",
                    "expiresAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_MicrolinkUpdate",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expiresAt": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated microlink",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "host": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "content": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "web": {
                              "type": "string",
                              "format": "uri"
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "when": {
                                    "type": "array",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "eq"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "number"
                                                }
                                              ]
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "in"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "values": {
                                              "type": "array",
                                              "items": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  }
                                                ]
                                              },
                                              "minItems": 1
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "values"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "lte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gt"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "op": {
                                              "type": "string",
                                              "enum": [
                                                "gte"
                                              ]
                                            },
                                            "field": {
                                              "type": "string",
                                              "enum": [
                                                "platform",
                                                "country",
                                                "now"
                                              ]
                                            },
                                            "value": {
                                              "type": "number"
                                            },
                                            "negate": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "op",
                                            "field",
                                            "value"
                                          ]
                                        }
                                      ]
                                    }
                                  },
                                  "to": {
                                    "type": "string",
                                    "format": "uri"
                                  }
                                },
                                "required": [
                                  "when",
                                  "to"
                                ]
                              }
                            }
                          },
                          "required": [
                            "web"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "body": {
                              "type": "string"
                            },
                            "markdown": {
                              "type": "boolean",
                              "default": false
                            }
                          },
                          "required": [
                            "body"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "headline": {
                              "type": "string"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri"
                            },
                            "links": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string"
                                  },
                                  "url": {
                                    "type": "string",
                                    "format": "uri"
                                  },
                                  "icon": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "label",
                                  "url"
                                ]
                              }
                            }
                          },
                          "required": [
                            "name",
                            "links"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "r2Key": {
                              "type": "string"
                            },
                            "filename": {
                              "type": "string"
                            },
                            "size": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "mime": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "r2Key",
                            "filename",
                            "size",
                            "mime"
                          ]
                        }
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "thumbnail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "number"
                    },
                    "updatedAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "host",
                    "type",
                    "content",
                    "title",
                    "description",
                    "thumbnail",
                    "expiresAt",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Destination is the link itself (self-redirect)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "self-redirect"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_MicrolinkDelete",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Microlink deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/{id}/stats": {
      "get": {
        "operationId": "get_MicrolinkStatsGet",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "12mo"
              ],
              "default": "7d"
            },
            "required": false,
            "name": "range",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The link's analytics for the range. Free tier is capped to the 7-day range and gets no dimensions (`depthLocked: true`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "range": {
                      "type": "string",
                      "enum": [
                        "24h",
                        "7d",
                        "30d",
                        "12mo"
                      ]
                    },
                    "depthLocked": {
                      "type": "boolean"
                    },
                    "totals": {
                      "type": "object",
                      "properties": {
                        "views": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "previews": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "downloads": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "bio_clicks": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "bytes_served": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "views",
                        "previews",
                        "downloads",
                        "bio_clicks",
                        "total",
                        "bytes_served"
                      ]
                    },
                    "daily": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "metrics": {
                            "type": "object",
                            "properties": {
                              "views": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "previews": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "downloads": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "bio_clicks": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "total": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "bytes_served": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "uniques": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "views",
                              "previews",
                              "downloads",
                              "bio_clicks",
                              "total",
                              "bytes_served",
                              "uniques"
                            ]
                          }
                        },
                        "required": [
                          "day",
                          "metrics"
                        ]
                      }
                    },
                    "dimensions": {
                      "type": "object",
                      "properties": {
                        "referrers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              }
                            },
                            "required": [
                              "key",
                              "count"
                            ]
                          }
                        },
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              }
                            },
                            "required": [
                              "key",
                              "count"
                            ]
                          }
                        },
                        "devices": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              }
                            },
                            "required": [
                              "key",
                              "count"
                            ]
                          }
                        },
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              }
                            },
                            "required": [
                              "key",
                              "count"
                            ]
                          }
                        },
                        "bio_links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "count": {
                                "type": "integer",
                                "exclusiveMinimum": 0
                              }
                            },
                            "required": [
                              "key",
                              "count"
                            ]
                          }
                        },
                        "params": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "values": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "count": {
                                      "type": "integer",
                                      "exclusiveMinimum": 0
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "count"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "key",
                              "values"
                            ]
                          }
                        }
                      },
                      "required": [
                        "referrers",
                        "countries",
                        "devices",
                        "rules",
                        "bio_links",
                        "params"
                      ]
                    },
                    "averageDailyUniques": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "range",
                    "depthLocked",
                    "totals",
                    "daily",
                    "averageDailyUniques"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/microlinks/{id}/qr": {
      "get": {
        "operationId": "get_MicrolinkQr",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "QR code as SVG",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/domains": {
      "get": {
        "operationId": "get_DomainList",
        "responses": {
          "200": {
            "description": "The signed-in user's custom domains",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "active",
                          "failed"
                        ]
                      },
                      "cnameTarget": {
                        "type": "string"
                      },
                      "verifyName": {
                        "type": "string"
                      },
                      "verifyValue": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "verifiedAt": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "verification": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "txt": {
                            "type": "object",
                            "properties": {
                              "found": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "ok": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "found",
                              "ok"
                            ]
                          },
                          "cname": {
                            "type": "object",
                            "properties": {
                              "found": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              }
                            },
                            "required": [
                              "found"
                            ]
                          }
                        },
                        "required": [
                          "txt",
                          "cname"
                        ]
                      }
                    },
                    "required": [
                      "hostname",
                      "status",
                      "cnameTarget",
                      "verifyName",
                      "verifyValue",
                      "createdAt",
                      "verifiedAt",
                      "verification"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_DomainCreate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hostname": {
                    "type": "string"
                  }
                },
                "required": [
                  "hostname"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Custom domain registered (pending verification)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "active",
                        "failed"
                      ]
                    },
                    "cnameTarget": {
                      "type": "string"
                    },
                    "verifyName": {
                      "type": "string"
                    },
                    "verifyValue": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "verifiedAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "verification": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "txt": {
                          "type": "object",
                          "properties": {
                            "found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ok": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "found",
                            "ok"
                          ]
                        },
                        "cname": {
                          "type": "object",
                          "properties": {
                            "found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "found"
                          ]
                        }
                      },
                      "required": [
                        "txt",
                        "cname"
                      ]
                    }
                  },
                  "required": [
                    "hostname",
                    "status",
                    "cnameTarget",
                    "verifyName",
                    "verifyValue",
                    "createdAt",
                    "verifiedAt",
                    "verification"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid hostname",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Pro plan required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "custom-domains-pro"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Hostname already registered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/domains/{hostname}": {
      "get": {
        "operationId": "get_DomainGet",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "hostname",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Custom domain, with status refreshed from Cloudflare",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hostname": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "active",
                        "failed"
                      ]
                    },
                    "cnameTarget": {
                      "type": "string"
                    },
                    "verifyName": {
                      "type": "string"
                    },
                    "verifyValue": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "verifiedAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "verification": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "txt": {
                          "type": "object",
                          "properties": {
                            "found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "ok": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "found",
                            "ok"
                          ]
                        },
                        "cname": {
                          "type": "object",
                          "properties": {
                            "found": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "found"
                          ]
                        }
                      },
                      "required": [
                        "txt",
                        "cname"
                      ]
                    }
                  },
                  "required": [
                    "hostname",
                    "status",
                    "cnameTarget",
                    "verifyName",
                    "verifyValue",
                    "createdAt",
                    "verifiedAt",
                    "verification"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_DomainDelete",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "hostname",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/upload/request": {
      "post": {
        "operationId": "post_UploadRequest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "mime": {
                    "type": "string"
                  }
                },
                "required": [
                  "filename",
                  "size",
                  "mime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "r2Key": {
                      "type": "string"
                    },
                    "uploadUrl": {
                      "type": "string"
                    },
                    "maxSize": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "r2Key",
                    "uploadUrl",
                    "maxSize"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Storage quota exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "storage-quota"
                      ]
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/upload/confirm": {
      "post": {
        "operationId": "post_UploadConfirm",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "r2Key": {
                    "type": "string"
                  }
                },
                "required": [
                  "r2Key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "r2Key": {
                      "type": "string"
                    },
                    "mime": {
                      "type": "string"
                    },
                    "size": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "r2Key",
                    "mime",
                    "size"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}