{
    "status": "success",
    "version": "v1",
    "data": {
        "api": "MUSTPAY Personal API",
        "version": "v1",
        "base_url": "https:\/\/mustpay.online\/api",
        "description": "The official API for mustpay.online \u2014 access products, blog articles, and user data.",
        "authentication": {
            "type": "Bearer Token",
            "description": "Login first to get your token, then send it in every request header.",
            "header": "Authorization: Bearer YOUR_TOKEN_HERE"
        },
        "endpoints": {
            "AUTH": [
                {
                    "method": "POST",
                    "url": "\/api\/auth\/register.php",
                    "description": "Create a new account",
                    "body": {
                        "name": "string",
                        "email": "string",
                        "password": "string (min 8)"
                    },
                    "auth": "Not required"
                },
                {
                    "method": "POST",
                    "url": "\/api\/auth\/login.php",
                    "description": "Login and get your Bearer token",
                    "body": {
                        "email": "string",
                        "password": "string"
                    },
                    "auth": "Not required"
                },
                {
                    "method": "POST",
                    "url": "\/api\/auth\/logout.php",
                    "description": "Invalidate your token",
                    "auth": "Required"
                }
            ],
            "PRODUCTS": [
                {
                    "method": "GET",
                    "url": "\/api\/products\/index.php",
                    "description": "List all products",
                    "params": {
                        "type": "digital|physical",
                        "search": "keyword",
                        "limit": "number",
                        "page": "number"
                    },
                    "auth": "Required"
                },
                {
                    "method": "POST",
                    "url": "\/api\/products\/index.php",
                    "description": "Add a new product (admin only)",
                    "body": {
                        "name": "string",
                        "description": "string",
                        "price": "number",
                        "type": "digital|physical",
                        "emoji": "string",
                        "badge": "string"
                    },
                    "auth": "Required (admin)"
                },
                {
                    "method": "GET",
                    "url": "\/api\/products\/single.php?id=1",
                    "description": "Get one product by ID",
                    "auth": "Required"
                },
                {
                    "method": "PUT",
                    "url": "\/api\/products\/single.php?id=1",
                    "description": "Update a product (admin only)",
                    "auth": "Required (admin)"
                },
                {
                    "method": "DELETE",
                    "url": "\/api\/products\/single.php?id=1",
                    "description": "Delete a product (admin only)",
                    "auth": "Required (admin)"
                }
            ],
            "BLOG": [
                {
                    "method": "GET",
                    "url": "\/api\/blog\/index.php",
                    "description": "List all articles",
                    "params": {
                        "category": "string",
                        "search": "keyword",
                        "limit": "number",
                        "page": "number"
                    },
                    "auth": "Required"
                },
                {
                    "method": "POST",
                    "url": "\/api\/blog\/index.php",
                    "description": "Create a new article (admin only)",
                    "body": {
                        "title": "string",
                        "category": "string",
                        "excerpt": "string",
                        "content": "string",
                        "emoji": "string"
                    },
                    "auth": "Required (admin)"
                },
                {
                    "method": "GET",
                    "url": "\/api\/blog\/single.php?id=1",
                    "description": "Get full article by ID",
                    "auth": "Required"
                },
                {
                    "method": "PUT",
                    "url": "\/api\/blog\/single.php?id=1",
                    "description": "Update article (admin only)",
                    "auth": "Required (admin)"
                },
                {
                    "method": "DELETE",
                    "url": "\/api\/blog\/single.php?id=1",
                    "description": "Delete article (admin only)",
                    "auth": "Required (admin)"
                }
            ],
            "USER": [
                {
                    "method": "GET",
                    "url": "\/api\/user\/profile.php",
                    "description": "Get your profile and dashboard stats",
                    "auth": "Required"
                },
                {
                    "method": "PUT",
                    "url": "\/api\/user\/profile.php",
                    "description": "Update your name or password",
                    "body": {
                        "name": "string (optional)",
                        "password": "string (optional, min 8)"
                    },
                    "auth": "Required"
                }
            ]
        },
        "example_request": {
            "step_1": "POST \/api\/auth\/login.php with {\"email\":\"you@email.com\",\"password\":\"yourpassword\"}",
            "step_2": "Copy the token from the response",
            "step_3": "Send \"Authorization: Bearer YOUR_TOKEN\" header in all future requests",
            "step_4": "GET \/api\/products\/index.php \u2014 returns all your products"
        }
    }
}