Developer Documentation

News Portal API

Total: 85 Protected: 63 Base: /api

Auth

Module

Public: 4 | Protected: 9

POST /api/2fa/verify
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "temp_token": {
        "type": "mixed",
        "required": false,
        "rules": "'required'"
    },
    "otp": {
        "type": "mixed",
        "required": false,
        "rules": "'required'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "token": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
GET /api/auth/check
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "authenticated": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
POST /api/login
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "email": {
        "type": "mixed",
        "required": false,
        "rules": "'required|email'"
    },
    "password": {
        "type": "string",
        "required": false,
        "rules": "'required|string|min:6'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "requires_2fa": {
        "type": "mixed"
    },
    "method": {
        "type": "mixed"
    },
    "temp_token": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
POST /api/register
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|max:255'"
    },
    "email": {
        "type": "string",
        "required": false,
        "rules": "'required|string|email|max:255|unique:users'"
    },
    "password": {
        "type": "string",
        "required": false,
        "rules": "'required|string|min:6|confirmed'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
POST /api/2fa/disable
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/2fa/email/enable
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/2fa/google/confirm
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "secret": {
        "type": "mixed",
        "required": false,
        "rules": "'required'"
    },
    "code": {
        "type": "mixed",
        "required": false,
        "rules": "'required'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/2fa/google/setup
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "secret": {
        "type": "mixed"
    },
    "qr_code_url": {
        "type": "mixed"
    }
}
POST /api/logout
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/profile/avatar
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "avatar": {
        "type": "image",
        "required": false,
        "rules": "'required|image|mimes:jpeg"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "avatar_url": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/profile/password
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "current_password": {
        "type": "mixed",
        "required": false,
        "rules": "'required'"
    },
    "password": {
        "type": "string",
        "required": false,
        "rules": "'required|string|min:8|confirmed'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    }
}
GET /api/profile
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PUT /api/profile
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|max:255'"
    },
    "email": {
        "type": "mixed",
        "required": false,
        "rules": "['required'"
    },
    "phone": {
        "type": "mixed",
        "required": false,
        "rules": "['nullable'"
    },
    "bio": {
        "type": "mixed",
        "required": false,
        "rules": "['nullable'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Category

Module

Public: 4 | Protected: 3

GET /api/categories/tree
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/categories
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "search": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_active": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "parent_id": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "sort_by": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "sort_order": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "meta": {
        "type": "mixed"
    },
    "current_page": {
        "type": "mixed"
    },
    "last_page": {
        "type": "mixed"
    },
    "per_page": {
        "type": "mixed"
    },
    "total": {
        "type": "mixed"
    }
}
POST /api/categories
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/category/{identifier}
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "identifier": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/category/{id}
auth:sanctum permission:categories.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PUT /api/category/{id}
auth:sanctum permission:categories.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{
    "name": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "parent_id": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "order": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_active": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": true,
        "rules": "'sometimes|required|string|max:255'"
    },
    "parent_id": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|exists:categories"
    },
    "order": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|integer'"
    },
    "is_active": {
        "type": "mixed",
        "required": false,
        "rules": "'boolean'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/category
auth:sanctum permission:categories.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|max:255'"
    },
    "parent_id": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|exists:categories"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Tags

Module

Public: 3 | Protected: 3

GET /api/tag/{identifier}
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "identifier": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/tags
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "search": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/tags
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PATCH /api/tag/{id}/toggle-status
auth:sanctum permission:tags.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/tag/{id}
auth:sanctum permission:tags.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/tag
auth:sanctum permission:tags.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "name": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|max:255|unique:tags"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Posts

Module

Public: 8 | Protected: 4

GET /api/news/{slug}
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "slug": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "related_posts": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "title": {
        "type": "mixed"
    },
    "subtitle": {
        "type": "mixed"
    },
    "slug": {
        "type": "mixed"
    },
    "content": {
        "type": "mixed"
    },
    "image": {
        "type": "mixed"
    },
    "image_caption": {
        "type": "mixed"
    },
    "image_source": {
        "type": "mixed"
    },
    "video_url": {
        "type": "mixed"
    },
    "published_at": {
        "type": "mixed"
    },
    "published_ago": {
        "type": "mixed"
    },
    "category": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "tags": {
        "type": "mixed"
    },
    "published_at_human": {
        "type": "mixed"
    },
    "published_date": {
        "type": "mixed"
    },
    "color": {
        "type": "mixed"
    },
    "author": {
        "type": "mixed"
    },
    "is_breaking": {
        "type": "mixed"
    },
    "is_featured": {
        "type": "mixed"
    },
    "is_exclusive": {
        "type": "mixed"
    },
    "view_count": {
        "type": "mixed"
    }
}
GET /api/post/{identifier}
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "identifier": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/post/{id}/related
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PATCH /api/post/{id}/share
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/post/{postId}/comments
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "postId": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/posts/popular
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "days": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/posts/recent
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/posts
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "search": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "meta": {
        "type": "mixed"
    },
    "current_page": {
        "type": "mixed"
    },
    "last_page": {
        "type": "mixed"
    },
    "per_page": {
        "type": "mixed"
    },
    "total": {
        "type": "mixed"
    }
}
DELETE /api/post/{id}/force
auth:sanctum permission:posts.force_delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/post/{id}
auth:sanctum permission:posts.delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PUT /api/post/{id}
auth:sanctum permission:posts.edit|posts.edit_any
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{
    "is_breaking": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_featured": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_exclusive": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_opinion": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "allow_comments": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "category_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "reporter_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "tag_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "featured_image_id": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "primary_category_id": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{
    "title": {
        "type": "string",
        "required": true,
        "rules": "'sometimes|required|string|max:255'"
    },
    "subtitle": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "slug": {
        "type": "string",
        "required": true,
        "rules": "'sometimes|required|string|max:255|unique:posts"
    },
    "content": {
        "type": "mixed",
        "required": true,
        "rules": "'sometimes|required|string'"
    },
    "short_description": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:5000'"
    },
    "primary_category_id": {
        "type": "mixed",
        "required": true,
        "rules": "'sometimes|required|exists:categories"
    },
    "category_ids": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|array'"
    },
    "category_ids.*": {
        "type": "mixed",
        "required": false,
        "rules": "'exists:categories"
    },
    "reporter_ids": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|array'"
    },
    "reporter_ids.*": {
        "type": "mixed",
        "required": false,
        "rules": "'exists:users"
    },
    "tag_ids": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|array'"
    },
    "tag_ids.*": {
        "type": "mixed",
        "required": false,
        "rules": "'exists:tags"
    },
    "image": {
        "type": "image",
        "required": false,
        "rules": "'nullable|image|mimes:jpeg"
    },
    "featured_image_id": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|exists:media"
    },
    "image_caption": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "image_source": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "video_url": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|url'"
    },
    "source": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "source_url": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|url'"
    },
    "division": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "district": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "upazila": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "meta_title": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|max:255'"
    },
    "meta_description": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|string'"
    },
    "meta_keywords": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|string'"
    },
    "layout": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|in:standard"
    },
    "status": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|in:draft"
    },
    "published_at": {
        "type": "mixed",
        "required": false,
        "rules": "'nullable|date'"
    },
    "is_breaking": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|boolean'"
    },
    "is_featured": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|boolean'"
    },
    "is_exclusive": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|boolean'"
    },
    "is_opinion": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|boolean'"
    },
    "allow_comments": {
        "type": "mixed",
        "required": false,
        "rules": "'sometimes|boolean'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/post
auth:sanctum permission:posts.create
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "primary_category_id": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "title": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "subtitle": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "short_description": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "content": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "image_caption": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "image_source": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "video_url": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "source": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "source_url": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "division": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "district": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "upazila": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "meta_title": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "meta_description": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "meta_keywords": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "layout": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "status": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "published_at": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_breaking": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_featured": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_opinion": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "is_exclusive": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "allow_comments": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "category_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "reporter_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "tag_ids": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "featured_image_id": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Comments

Module

Public: 0 | Protected: 8

DELETE /api/admin/comments/{id}/force
auth:sanctum permission:comments.approve|comments.delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PATCH /api/admin/comments/{id}/pin
auth:sanctum permission:comments.approve|comments.delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}
PATCH /api/admin/comments/{id}/status
auth:sanctum permission:comments.approve|comments.delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "status": {
        "type": "mixed",
        "required": false,
        "rules": "'required|in:pending"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}
GET /api/admin/comments
auth:sanctum permission:comments.approve|comments.delete
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "status": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/comment/{id}/dislike
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/comment/{id}/like
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/comment/{id}
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/comments
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Media

Module

Public: 0 | Protected: 5

DELETE /api/media/{id}
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/media/{id}
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "url": {
        "type": "mixed"
    }
}
PUT /api/media/{id}
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|max:255'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}
GET /api/media
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "search": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "type": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/media
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "file": {
        "type": "file",
        "required": false,
        "rules": "'required|file|mimes:jpeg"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "file_name": {
        "type": "mixed"
    },
    "url": {
        "type": "mixed"
    },
    "mime_type": {
        "type": "mixed"
    },
    "size": {
        "type": "mixed"
    }
}

Notifications

Module

Public: 0 | Protected: 5

PATCH /api/notifications/mark-all-read
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/notifications/unread-count
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "count": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PATCH /api/notifications/{id}/read
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/notifications
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/notifications
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Users

Module

Public: 0 | Protected: 8

GET /api/user/login-history
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}
DELETE /api/users/{id}/force
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PATCH /api/users/{id}/restore
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/users/{id}
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/users/{id}
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
PUT /api/users/{id}
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{
    "password": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "role": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
GET /api/users
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "search": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "role": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "status": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "sort_by": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "sort_order": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "limit": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "meta": {
        "type": "mixed"
    },
    "current_page": {
        "type": "mixed"
    },
    "last_page": {
        "type": "mixed"
    },
    "per_page": {
        "type": "mixed"
    },
    "total": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}
POST /api/users
auth:sanctum permission:users.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "username": {
        "type": "mixed"
    },
    "full_name": {
        "type": "mixed"
    },
    "short_name": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "designation": {
        "type": "mixed"
    },
    "bio": {
        "type": "mixed"
    },
    "is_verified": {
        "type": "mixed"
    },
    "social_links": {
        "type": "mixed"
    },
    "created_at_human": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "phone_number": {
        "type": "mixed"
    },
    "location": {
        "type": "mixed"
    },
    "date_of_birth": {
        "type": "mixed"
    },
    "gender": {
        "type": "mixed"
    },
    "employee_id": {
        "type": "mixed"
    },
    "joining_date": {
        "type": "mixed"
    },
    "department": {
        "type": "mixed"
    },
    "status": {
        "type": "mixed"
    },
    "is_2fa_enabled": {
        "type": "mixed"
    },
    "last_login_at": {
        "type": "mixed"
    },
    "last_login_ip": {
        "type": "mixed"
    },
    "preferences": {
        "type": "mixed"
    },
    "roles": {
        "type": "mixed"
    },
    "permissions": {
        "type": "mixed"
    }
}

Roles & Permissions

Module

Public: 0 | Protected: 9

GET /api/admin/permissions
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/permissions
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "string",
        "required": false,
        "rules": "'required|string|unique:permissions"
    },
    "guard_name": {
        "type": "string",
        "required": false,
        "rules": "'nullable|string|default:api'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
GET /api/admin/roles/{id}/permissions
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/roles/{id}/permissions
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "permissions": {
        "type": "mixed",
        "required": false,
        "rules": "'required|array'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
DELETE /api/admin/roles/{id}
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
PUT /api/admin/roles/{id}
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{
    "id": {
        "type": "string",
        "required": true,
        "in": "path"
    }
}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "mixed",
        "required": false,
        "rules": "['required'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}
GET /api/admin/roles
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/roles
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "name": {
        "type": "mixed",
        "required": false,
        "rules": "'required|unique:roles"
    },
    "permissions": {
        "type": "mixed",
        "required": false,
        "rules": "'required|array'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/users/assign-role
auth:sanctum permission:roles.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "user_id": {
        "type": "mixed",
        "required": false,
        "rules": "'required|exists:users"
    },
    "roles": {
        "type": "mixed",
        "required": false,
        "rules": "'required|array'"
    },
    "roles.*": {
        "type": "mixed",
        "required": false,
        "rules": "'exists:roles"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}

Dashboard

Module

Public: 0 | Protected: 6

GET /api/admin/dashboard/activity
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "description": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "time": {
        "type": "mixed"
    },
    "event": {
        "type": "mixed"
    },
    "subject_type": {
        "type": "mixed"
    }
}
GET /api/admin/dashboard/charts
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "line_chart": {
        "type": "mixed"
    },
    "pie_chart": {
        "type": "mixed"
    },
    "label": {
        "type": "mixed"
    },
    "value": {
        "type": "mixed"
    },
    "color": {
        "type": "mixed"
    }
}
GET /api/admin/dashboard/my-stats
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "user": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "role": {
        "type": "mixed"
    }
}
GET /api/admin/dashboard/reporter-stats
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "period": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "period": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "email": {
        "type": "mixed"
    },
    "avatar": {
        "type": "mixed"
    },
    "total_posts": {
        "type": "mixed"
    },
    "total_views": {
        "type": "mixed"
    }
}
GET /api/admin/dashboard/stats
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "total_posts": {
        "type": "mixed"
    },
    "published_posts": {
        "type": "mixed"
    },
    "pending_posts": {
        "type": "mixed"
    },
    "total_views": {
        "type": "mixed"
    },
    "total_users": {
        "type": "mixed"
    },
    "active_reporters": {
        "type": "mixed"
    },
    "posts_today": {
        "type": "mixed"
    }
}
GET /api/admin/dashboard/top-posts
auth:sanctum
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    }
}

Settings

Module

Public: 1 | Protected: 1

GET /api/settings
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/settings
auth:sanctum permission:settings.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{
    "settings": {
        "type": "mixed",
        "required": false,
        "rules": "'required|array'"
    }
}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

Activity Logs

Module

Public: 0 | Protected: 2

DELETE /api/admin/logs/clean
auth:sanctum permission:activity.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}
POST /api/admin/logs
auth:sanctum permission:activity.manage
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "per_page": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "user_id": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "subject_type": {
        "in": "query",
        "type": "string",
        "required": false
    },
    "event": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    }
}

General

Module

Public: 2 | Protected: 0

GET /api/home
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "statusCode": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "slug": {
        "type": "mixed"
    },
    "color": {
        "type": "mixed"
    },
    "posts": {
        "type": "mixed"
    },
    "breaking_news": {
        "type": "mixed"
    },
    "featured_posts": {
        "type": "mixed"
    },
    "latest_posts": {
        "type": "mixed"
    },
    "popular_posts": {
        "type": "mixed"
    },
    "category_sections": {
        "type": "mixed"
    },
    "title": {
        "type": "mixed"
    },
    "subtitle": {
        "type": "mixed"
    },
    "image": {
        "type": "mixed"
    },
    "published_at_human": {
        "type": "mixed"
    },
    "published_date": {
        "type": "mixed"
    },
    "category": {
        "type": "mixed"
    },
    "author": {
        "type": "mixed"
    },
    "is_breaking": {
        "type": "mixed"
    },
    "is_featured": {
        "type": "mixed"
    },
    "is_exclusive": {
        "type": "mixed"
    },
    "view_count": {
        "type": "mixed"
    }
}
POST /api/search
public
JSON Docs (Params, Search, Request, Response)

Path Params (JSON)

{}

Search Params (JSON)

{
    "q": {
        "in": "query",
        "type": "string",
        "required": false
    }
}

Request Body Fields (JSON)

{}

Response Fields (JSON)

{
    "success": {
        "type": "mixed"
    },
    "message": {
        "type": "mixed"
    },
    "data": {
        "type": "mixed"
    },
    "pagination": {
        "type": "mixed"
    },
    "total": {
        "type": "mixed"
    },
    "per_page": {
        "type": "mixed"
    },
    "current_page": {
        "type": "mixed"
    },
    "last_page": {
        "type": "mixed"
    },
    "id": {
        "type": "mixed"
    },
    "title": {
        "type": "mixed"
    },
    "slug": {
        "type": "mixed"
    },
    "subtitle": {
        "type": "mixed"
    },
    "image": {
        "type": "mixed"
    },
    "published_at_human": {
        "type": "mixed"
    },
    "published_date": {
        "type": "mixed"
    },
    "category": {
        "type": "mixed"
    },
    "name": {
        "type": "mixed"
    },
    "color": {
        "type": "mixed"
    },
    "author": {
        "type": "mixed"
    },
    "is_breaking": {
        "type": "mixed"
    },
    "is_featured": {
        "type": "mixed"
    },
    "is_exclusive": {
        "type": "mixed"
    },
    "view_count": {
        "type": "mixed"
    }
}