{
    "openapi": "3.1.0",
    "info": {
        "title": "Thylink",
        "version": "1.0.0",
        "description": "REST API for Thylink profiles, links, videos, events and click analytics. Authenticated with Laravel Sanctum bearer tokens. See https:\/\/thyl.ink\/docs for the guide."
    },
    "servers": [
        {
            "url": "https:\/\/thyl.ink\/api\/v1"
        }
    ],
    "paths": {
        "\/": {
            "get": {
                "operationId": "apiIndex",
                "description": "The entry point an agent reaches when it strips the path off an endpoint\nit was given: what this API is, where it is documented, how it is\nauthenticated, what it costs in rate-limit budget, and what happens to a\nversion when it is retired.",
                "summary": "API root",
                "tags": [
                    "ApiIndex"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "version": {
                                            "type": "string",
                                            "const": "1"
                                        },
                                        "description": {
                                            "type": "string",
                                            "const": "REST API for Thylink profiles, links, videos, events and click analytics."
                                        },
                                        "base_url": {
                                            "type": "string"
                                        },
                                        "documentation": {
                                            "type": "string"
                                        },
                                        "openapi": {
                                            "type": "string"
                                        },
                                        "authentication": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "const": "bearer"
                                                },
                                                "scheme": {
                                                    "type": "string",
                                                    "const": "Laravel Sanctum personal access token"
                                                },
                                                "header": {
                                                    "type": "string",
                                                    "const": "Authorization: Bearer {token}"
                                                },
                                                "obtain_token": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "scheme",
                                                "header",
                                                "obtain_token"
                                            ]
                                        },
                                        "rate_limits": {
                                            "type": "object",
                                            "properties": {
                                                "public": {
                                                    "type": "string",
                                                    "const": "10 requests per minute per client (\/auth, \/sso)"
                                                },
                                                "authenticated": {
                                                    "type": "string",
                                                    "const": "100 requests per minute per token"
                                                },
                                                "headers": {
                                                    "type": "array",
                                                    "prefixItems": [
                                                        {
                                                            "type": "string",
                                                            "const": "RateLimit-Limit"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "const": "RateLimit-Remaining"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "const": "RateLimit-Reset"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "const": "RateLimit-Policy"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "const": "Retry-After"
                                                        }
                                                    ],
                                                    "minItems": 5,
                                                    "maxItems": 5,
                                                    "additionalItems": false
                                                }
                                            },
                                            "required": [
                                                "public",
                                                "authenticated",
                                                "headers"
                                            ]
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "format": {
                                                    "type": "string",
                                                    "const": "application\/json"
                                                },
                                                "shape": {
                                                    "type": "string",
                                                    "const": "message, optional errors, and an error object carrying code, status, hint and documentation_url"
                                                }
                                            },
                                            "required": [
                                                "format",
                                                "shape"
                                            ]
                                        },
                                        "versioning": {
                                            "type": "object",
                                            "properties": {
                                                "strategy": {
                                                    "type": "string",
                                                    "const": "URL path"
                                                },
                                                "current": {
                                                    "type": "string",
                                                    "const": "v1"
                                                },
                                                "response_header": {
                                                    "type": "string",
                                                    "const": "API-Version"
                                                },
                                                "unversioned_alias": {
                                                    "type": "string"
                                                },
                                                "deprecation_policy": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "strategy",
                                                "current",
                                                "response_header",
                                                "unversioned_alias",
                                                "deprecation_policy"
                                            ]
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "llms_txt": {
                                                    "type": "string"
                                                },
                                                "agent_instructions": {
                                                    "type": "string"
                                                },
                                                "sitemap": {
                                                    "type": "string"
                                                },
                                                "documentation": {
                                                    "type": "string"
                                                },
                                                "contact": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "llms_txt",
                                                "agent_instructions",
                                                "sitemap",
                                                "documentation",
                                                "contact"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "name",
                                        "version",
                                        "description",
                                        "base_url",
                                        "documentation",
                                        "openapi",
                                        "authentication",
                                        "rate_limits",
                                        "errors",
                                        "versioning",
                                        "links"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/auth\/register": {
            "post": {
                "operationId": "auth.register",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "username": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "password": {
                                        "type": "string",
                                        "minLength": 8
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "username",
                                    "password",
                                    "service_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "User registered successfully"
                                        },
                                        "user": {
                                            "$ref": "#\/components\/schemas\/User"
                                        },
                                        "token": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user",
                                        "token"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/auth\/login": {
            "post": {
                "operationId": "auth.login",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email",
                                    "password",
                                    "service_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Login successful"
                                        },
                                        "user": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/User"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "token": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user",
                                        "token"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/auth\/sso\/token": {
            "post": {
                "operationId": "auth.ssoToken",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "username": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_user_id": {
                                        "type": "string",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email",
                                    "name",
                                    "username",
                                    "service_name",
                                    "service_user_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "SSO token generated successfully"
                                        },
                                        "user": {
                                            "$ref": "#\/components\/schemas\/User"
                                        },
                                        "token": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user",
                                        "token"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/tokens": {
            "get": {
                "operationId": "auth.tokens",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "tokens": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "last_used_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date-time"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date-time"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "last_used_at",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "tokens"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "auth.createToken",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "abilities": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Token created successfully"
                                        },
                                        "token": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "token"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/tokens\/{tokenId}": {
            "delete": {
                "operationId": "auth.revokeToken",
                "tags": [
                    "Auth"
                ],
                "parameters": [
                    {
                        "name": "tokenId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Token revoked successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Token not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events": {
            "get": {
                "operationId": "event.index",
                "summary": "Get upcoming published events for the authenticated user",
                "tags": [
                    "Event"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "events": {
                                            "type": "string"
                                        },
                                        "total": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "events",
                                        "total"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/social": {
            "get": {
                "operationId": "link.getSocialLinks",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "social_links": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SocialLink"
                                            }
                                        }
                                    },
                                    "required": [
                                        "social_links"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "link.addSocialLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "sort_order": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "platform",
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Social link added successfully"
                                        },
                                        "social_link": {
                                            "$ref": "#\/components\/schemas\/SocialLink"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "social_link"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/custom": {
            "get": {
                "operationId": "link.getCustomLinks",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "custom_links": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CustomLink"
                                            }
                                        }
                                    },
                                    "required": [
                                        "custom_links"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "link.addCustomLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "external_image_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    },
                                    "sort_order": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "title",
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Custom link added successfully"
                                        },
                                        "custom_link": {
                                            "$ref": "#\/components\/schemas\/CustomLink"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "custom_link"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/youtube": {
            "get": {
                "operationId": "link.getYoutubeVideos",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "youtube_videos": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/YoutubeVideo"
                                            }
                                        }
                                    },
                                    "required": [
                                        "youtube_videos"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "link.addYoutubeVideo",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "video_id": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "video_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YouTube video added successfully"
                                        },
                                        "youtube_video": {
                                            "$ref": "#\/components\/schemas\/YoutubeVideo"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "youtube_video"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/social\/{id}": {
            "put": {
                "operationId": "link.updateSocialLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "minimum": 0
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Social link updated successfully"
                                        },
                                        "social_link": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/SocialLink"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "social_link"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Social link not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "link.deleteSocialLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Social link deleted successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Social link not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/custom\/{id}": {
            "put": {
                "operationId": "link.updateCustomLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "external_image_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "minimum": 0
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Custom link updated successfully"
                                        },
                                        "custom_link": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/CustomLink"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "custom_link"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Custom link not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "link.deleteCustomLink",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Custom link deleted successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Custom link not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/links\/youtube\/{id}": {
            "put": {
                "operationId": "link.updateYoutubeVideo",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "video_id": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "title": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YouTube video updated successfully"
                                        },
                                        "youtube_video": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/YoutubeVideo"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "youtube_video"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "YouTube video not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "link.deleteYoutubeVideo",
                "tags": [
                    "Link"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "YouTube video deleted successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "YouTube video not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Profile not found"
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/link\/visit": {
            "post": {
                "operationId": "linkClick.track",
                "summary": "Track a click on a custom link",
                "tags": [
                    "LinkClick"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "link_id": {
                                        "type": "integer"
                                    },
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "custom_link",
                                            "org_custom_link"
                                        ]
                                    }
                                },
                                "required": [
                                    "link_id",
                                    "type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "success"
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "ignored"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Click already counted recently."
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/profiles": {
            "post": {
                "operationId": "profile.create",
                "tags": [
                    "Profile"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "username": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "bio": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "website": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "external_profile_picture_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "show_email": {
                                        "type": "boolean"
                                    },
                                    "language": {
                                        "type": "string",
                                        "enum": [
                                            "en",
                                            "es",
                                            "fr",
                                            "pt"
                                        ]
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "username"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile created successfully"
                                        },
                                        "user": {
                                            "$ref": "#\/components\/schemas\/User"
                                        },
                                        "profile_url": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user",
                                        "profile_url"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}": {
            "get": {
                "operationId": "profile.show",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "username": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "bio": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "website": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "profile_picture_url": {
                                                    "type": "string"
                                                },
                                                "is_premium": {
                                                    "type": "boolean"
                                                },
                                                "language": {
                                                    "type": "string"
                                                },
                                                "profile_url": {
                                                    "type": "string"
                                                },
                                                "social_links": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/SocialLink"
                                                    }
                                                },
                                                "custom_links": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/CustomLink"
                                                    }
                                                },
                                                "youtube_videos": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/YoutubeVideo"
                                                    }
                                                },
                                                "customization": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "username",
                                                "bio",
                                                "website",
                                                "profile_picture_url",
                                                "is_premium",
                                                "language",
                                                "profile_url",
                                                "social_links",
                                                "custom_links",
                                                "youtube_videos",
                                                "customization",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "profile.update",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "bio": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "website": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "external_profile_picture_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "show_email": {
                                        "type": "boolean"
                                    },
                                    "language": {
                                        "type": "string",
                                        "enum": [
                                            "en",
                                            "es",
                                            "fr",
                                            "pt"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile updated successfully"
                                        },
                                        "user": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/User"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "profile.delete",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile deleted successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/profiles\/{username}\/customization": {
            "get": {
                "operationId": "profile.getCustomization",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "customization": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "customization"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "profile.updateCustomization",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "theme": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "primary_color": {
                                        "type": "string",
                                        "maxLength": 7
                                    },
                                    "accent_color": {
                                        "type": "string",
                                        "maxLength": 7
                                    },
                                    "text_color": {
                                        "type": "string",
                                        "maxLength": 7
                                    },
                                    "background_style": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "layout_style": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "card_style": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "show_shadows": {
                                        "type": "boolean"
                                    },
                                    "show_borders": {
                                        "type": "boolean"
                                    },
                                    "font_style": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "heading_size": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "button_style": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "button_variant": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "enable_animations": {
                                        "type": "boolean"
                                    },
                                    "enable_hover_effects": {
                                        "type": "boolean"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Customization updated successfully"
                                        },
                                        "customization": {
                                            "$ref": "#\/components\/schemas\/ProfileCustomization"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "customization"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/analytics\/profiles\/{username}\/stats": {
            "get": {
                "operationId": "profile.getStats",
                "description": "Counts use the unfiltered relations, so a deactivated link still counts as\none the profile has. `link_clicks` is the lifetime total; the windowed\nfigure beside it only covers what click retention still holds \u2014 30 days on\na free account, 365 on premium.",
                "summary": "Profile statistics",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "stats": {
                                            "type": "object",
                                            "properties": {
                                                "profile_views": {
                                                    "type": "integer"
                                                },
                                                "link_clicks": {
                                                    "type": "integer"
                                                },
                                                "link_clicks_in_window": {
                                                    "type": "integer"
                                                },
                                                "window_days": {
                                                    "type": "integer",
                                                    "enum": [
                                                        365,
                                                        30
                                                    ]
                                                },
                                                "social_links_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "custom_links_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "youtube_videos_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "profile_views",
                                                "link_clicks",
                                                "link_clicks_in_window",
                                                "window_days",
                                                "social_links_count",
                                                "custom_links_count",
                                                "youtube_videos_count",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "stats"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/analytics\/profiles\/{username}\/clicks": {
            "get": {
                "operationId": "profile.getClicks",
                "description": "`by_date` is zero-filled across the whole window, daily for a free account\nand monthly for premium, so a gap in the series means no clicks rather than\nmissing data.",
                "summary": "Click analytics for the profile's own links",
                "tags": [
                    "Profile"
                ],
                "parameters": [
                    {
                        "name": "username",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "clicks": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "total_in_window": {
                                                    "type": "integer"
                                                },
                                                "window_days": {
                                                    "type": "integer",
                                                    "enum": [
                                                        365,
                                                        30
                                                    ]
                                                },
                                                "granularity": {
                                                    "type": "string",
                                                    "enum": [
                                                        "month",
                                                        "day"
                                                    ]
                                                },
                                                "by_link": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "title": {
                                                                "type": "string"
                                                            },
                                                            "url": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            },
                                                            "clicks": {
                                                                "type": "integer"
                                                            },
                                                            "clicks_in_window": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "title",
                                                            "url",
                                                            "is_active",
                                                            "clicks",
                                                            "clicks_in_window"
                                                        ]
                                                    }
                                                },
                                                "by_date": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "date": {
                                                                "type": "string"
                                                            },
                                                            "clicks": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "clicks"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "total_in_window",
                                                "window_days",
                                                "granularity",
                                                "by_link",
                                                "by_date"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "clicks"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile not found"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/sso\/authenticate": {
            "post": {
                "operationId": "sso.authenticate",
                "summary": "Authenticate user from external service (Tattooya)\nCreates or updates user and returns access token",
                "tags": [
                    "SSO"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "username": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_user_id": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_token": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "email",
                                    "name",
                                    "service_name",
                                    "service_token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Authentication failed"
                                        },
                                        "error": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string",
                                                    "enum": [
                                                        "Internal server error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "username": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "profile_url": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "username",
                                                        "profile_url"
                                                    ]
                                                },
                                                "token": {
                                                    "type": "string"
                                                },
                                                "token_name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "token",
                                                "token_name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Invalid service credentials"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/sso\/token\/validate": {
            "post": {
                "operationId": "sso.validateToken",
                "summary": "Validate an existing token",
                "tags": [
                    "SSO"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "token": {
                                        "type": "string"
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_token": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "token",
                                    "service_name",
                                    "service_token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "user": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "username": {
                                                            "type": "string"
                                                        },
                                                        "profile_url": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "username",
                                                        "profile_url"
                                                    ]
                                                },
                                                "abilities": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "last_used_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "user",
                                                "abilities",
                                                "last_used_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "success": {
                                                    "type": "boolean"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Invalid token"
                                                }
                                            },
                                            "required": [
                                                "success",
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "success": {
                                                    "type": "boolean"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Invalid service credentials"
                                                }
                                            },
                                            "required": [
                                                "success",
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Token is required"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/sso\/user\/create": {
            "post": {
                "operationId": "sso.createUser",
                "summary": "Create a new user (for external services)",
                "tags": [
                    "SSO"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "username": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_token": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "service_name",
                                    "service_token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "User creation failed"
                                        },
                                        "error": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string",
                                                    "enum": [
                                                        "Internal server error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "username": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "profile_url": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "username",
                                                        "profile_url"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "user"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Invalid service credentials"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/sso\/user\/sync": {
            "post": {
                "operationId": "sso.syncUser",
                "summary": "Sync user data from external service",
                "tags": [
                    "SSO"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_user_id": {
                                        "type": "string"
                                    },
                                    "service_name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "service_token": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    }
                                },
                                "required": [
                                    "service_user_id",
                                    "service_name",
                                    "service_token",
                                    "email"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "User sync failed"
                                        },
                                        "error": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string",
                                                    "enum": [
                                                        "Internal server error"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "username": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "profile_url": {
                                                            "type": "string"
                                                        },
                                                        "external_service_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "username",
                                                        "profile_url",
                                                        "external_service_id"
                                                    ]
                                                },
                                                "token": {
                                                    "type": "string"
                                                },
                                                "token_name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "token",
                                                "token_name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "User not found"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Invalid service credentials"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/user\/profile": {
            "get": {
                "operationId": "user.profile",
                "tags": [
                    "User"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "username": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "bio": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "website": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "profile_picture_url": {
                                                    "type": "string"
                                                },
                                                "show_email": {
                                                    "type": "integer"
                                                },
                                                "is_premium": {
                                                    "type": "boolean"
                                                },
                                                "language": {
                                                    "type": "string"
                                                },
                                                "profile_url": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "username",
                                                "bio",
                                                "website",
                                                "profile_picture_url",
                                                "show_email",
                                                "is_premium",
                                                "language",
                                                "profile_url",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "user.updateProfile",
                "tags": [
                    "User"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "bio": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    },
                                    "website": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "external_profile_picture_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "show_email": {
                                        "type": "boolean"
                                    },
                                    "language": {
                                        "type": "string",
                                        "enum": [
                                            "en",
                                            "es",
                                            "fr",
                                            "pt"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profile updated successfully"
                                        },
                                        "user": {
                                            "anyOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/User"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Validation failed"
                                        },
                                        "errors": {
                                            "$ref": "#\/components\/schemas\/MessageBag"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/user\/account": {
            "delete": {
                "operationId": "user.deleteAccount",
                "tags": [
                    "User"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Account deleted successfully"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "CustomLink": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "image": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_image_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sort_order": {
                        "type": "integer"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "clicks": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "title",
                    "url",
                    "image",
                    "external_image_url",
                    "sort_order",
                    "is_active",
                    "clicks",
                    "created_at",
                    "updated_at"
                ],
                "title": "CustomLink"
            },
            "MessageBag": {
                "type": "array",
                "items": {},
                "title": "MessageBag"
            },
            "ProfileCustomization": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "theme": {
                        "type": "string"
                    },
                    "primary_color": {
                        "type": "string"
                    },
                    "accent_color": {
                        "type": "string"
                    },
                    "text_color": {
                        "type": "string"
                    },
                    "background_style": {
                        "type": "string"
                    },
                    "background_color": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "background_image": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "header_image": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "background_pattern": {
                        "type": "string"
                    },
                    "gradient_direction": {
                        "type": "string"
                    },
                    "avatar_shape": {
                        "type": "string"
                    },
                    "header_layout": {
                        "type": "string"
                    },
                    "spacing": {
                        "type": "string"
                    },
                    "layout_style": {
                        "type": "string"
                    },
                    "card_style": {
                        "type": "string"
                    },
                    "show_shadows": {
                        "type": "boolean"
                    },
                    "show_borders": {
                        "type": "boolean"
                    },
                    "font_style": {
                        "type": "string"
                    },
                    "heading_size": {
                        "type": "string"
                    },
                    "button_style": {
                        "type": "string"
                    },
                    "button_variant": {
                        "type": "string"
                    },
                    "enable_animations": {
                        "type": "boolean"
                    },
                    "enable_hover_effects": {
                        "type": "boolean"
                    },
                    "custom_css": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sections_order": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "hidden_sections": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "template_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "theme",
                    "primary_color",
                    "accent_color",
                    "text_color",
                    "background_style",
                    "background_color",
                    "background_image",
                    "header_image",
                    "background_pattern",
                    "gradient_direction",
                    "avatar_shape",
                    "header_layout",
                    "spacing",
                    "layout_style",
                    "card_style",
                    "show_shadows",
                    "show_borders",
                    "font_style",
                    "heading_size",
                    "button_style",
                    "button_variant",
                    "enable_animations",
                    "enable_hover_effects",
                    "custom_css",
                    "sections_order",
                    "hidden_sections",
                    "created_at",
                    "updated_at",
                    "template_id"
                ],
                "title": "ProfileCustomization"
            },
            "SocialLink": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "platform": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "sort_order": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "platform",
                    "url",
                    "sort_order",
                    "created_at",
                    "updated_at"
                ],
                "title": "SocialLink"
            },
            "User": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "username": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_service_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_service_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email": {
                        "type": "string"
                    },
                    "bio": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "profile_picture": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_profile_picture_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "website": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "show_email": {
                        "type": "integer"
                    },
                    "is_premium": {
                        "type": "boolean"
                    },
                    "language": {
                        "type": "string"
                    },
                    "all_events_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "email_verified_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "profile_views": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "username",
                    "external_service_id",
                    "external_service_name",
                    "email",
                    "bio",
                    "profile_picture",
                    "external_profile_picture_url",
                    "website",
                    "show_email",
                    "is_premium",
                    "language",
                    "all_events_url",
                    "email_verified_at",
                    "created_at",
                    "updated_at",
                    "profile_views"
                ],
                "title": "User"
            },
            "YoutubeVideo": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "user_id": {
                        "type": "integer"
                    },
                    "youtube_url": {
                        "type": "string"
                    },
                    "video_id": {
                        "type": "string"
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "thumbnail_url": {
                        "type": "string"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "user_id",
                    "youtube_url",
                    "video_id",
                    "title",
                    "thumbnail_url",
                    "is_active",
                    "created_at",
                    "updated_at"
                ],
                "title": "YoutubeVideo"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}