MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Endpoints

GET api/user

Example request:
curl --request GET \
    --get "http://localhost:8000/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get all roles.

Returns a list of all roles available in the system.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/roles/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/roles/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "roles": [
        {
            "id": 1,
            "name": "Admin",
            "guard_name": "web",
            "created_at": "2024-01-01T12:00:00.000000Z",
            "updated_at": "2024-01-01T12:00:00.000000Z"
        },
        {
            "id": 2,
            "name": "Client",
            "guard_name": "client",
            "created_at": "2024-01-01T12:00:00.000000Z",
            "updated_at": "2024-01-01T12:00:00.000000Z"
        }
    ]
}
 

Request      

GET api/roles/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

GET api/permissions/{id?}

Example request:
curl --request GET \
    --get "http://localhost:8000/api/permissions/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/permissions/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin
access-control-allow-origin: *
 

{
    "error": true,
    "message": "Role not found."
}
 

Request      

GET api/permissions/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

GET api/master-panel/dashboardList

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/dashboardList" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/dashboardList"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (302):

Show headers
cache-control: no-cache, private
location: http://localhost:8000
content-type: text/html; charset=utf-8
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: strict-origin-when-cross-origin
access-control-allow-origin: *
 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url='http://localhost:8000'" />

        <title>Redirecting to http://localhost:8000</title>
    </head>
    <body>
        Redirecting to <a href="http://localhost:8000">http://localhost:8000</a>.
    </body>
</html>
 

Request      

GET api/master-panel/dashboardList

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/master-panel/update-module-dates

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/update-module-dates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module\": {
        \"type\": \"project\",
        \"id\": 17
    },
    \"start_date\": \"consequatur\",
    \"end_date\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update-module-dates"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "module": {
        "type": "project",
        "id": 17
    },
    "start_date": "consequatur",
    "end_date": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/master-panel/update-module-dates

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

module   object   
type   string   

Example: project

Must be one of:
  • project
  • task
id   integer   

Example: 17

start_date   string   

Example: consequatur

end_date   string   

Temporarily validate as a string. Example: consequatur

POST api/master-panel/tasks/media/delete-multiple

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/tasks/media/delete-multiple" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        17
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/media/delete-multiple"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        17
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/master-panel/tasks/media/delete-multiple

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   integer[]  optional  

Ensure 'ids' is present and an array. The id of an existing record in the media table.

Update the completion status of a Todo.

This endpoint allows the user to update the is_completed status of a specific Todo item by providing its ID and the desired status.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/todo/update-status" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 12,
    \"status\": true,
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/todo/update-status"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 12,
    "status": true,
    "isApi": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": 12,
    "activity_message": "John Doe marked todo Task Title as Completed"
}
 

Example response (404):


{
    "error": true,
    "message": "No query results for model [App\\Models\\Todo] 999."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "status": [
            "The status field is required."
        ]
    }
}
 

Example response (500):


{
    "error": "Detailed error message",
    "message": "Todo couldn't be updated.",
    "line": 123,
    "file": "/path/to/file.php"
}
 

Request      

POST api/master-panel/todo/update-status

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id   integer   

The ID of the Todo. Example: 12

status   boolean   

Status to set. 1 for completed, 0 for pending. Example: true

isApi   boolean  optional  

optional Whether the request is API-based. Example: true

DELETE api/master-panel/payslips/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/payslips/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/payslips/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/master-panel/payslips/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the payslip. Example: consequatur

User Authentication

This endpoint allows a user or client to authenticate using email and password. It applies rate limiting and returns a Bearer token upon successful login.

Register a new user

This endpoint allows a new user to register with first name, last name, email, phone, and password. The system ensures the email and phone are unique across both users and clients. Upon successful registration, the user is assigned the "admin" role, an admin record is created, and a token is issued.

Example request:
curl --request POST \
    "http://localhost:8000/api/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"ramanandi\",
    \"email\": \"bhurabhai@example.com\",
    \"phone\": \"9876543210\",
    \"password\": \"secret123\",
    \"password_confirmation\": \"secret123\"
}"
const url = new URL(
    "http://localhost:8000/api/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "ramanandi",
    "email": "bhurabhai@example.com",
    "phone": "9876543210",
    "password": "secret123",
    "password_confirmation": "secret123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Successful Registration):


{
    "error": false,
    "message": "User registered successfully",
    "redirect_url": "http://localhost:8000/login",
    "access_token": "1|ABCDEF1234567890...",
    "token_type": "Bearer"
}
 

Example response (422, Validation Failed):


{
    "error": true,
    "message": {
        "email": [
            "The email has already been taken in users or clients."
        ],
        "password": [
            "Password must be at least 6 characters long."
        ]
    }
}
 

Example response (500, Server Error):


{
    "error": true,
    "message": "Something went wrong on the server."
}
 

Request      

POST api/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

The first name of the user. Must not contain numbers. Example: John

last_name   string   

The last name of the user. Must not contain numbers. Example: ramanandi

email   string   

Must be a valid email and unique across users and clients. Example: bhurabhai@example.com

phone   string   

Must be a string of digits and unique among users. Example: 9876543210

password   string   

Minimum 6 characters. Example: secret123

password_confirmation   string   

Must match the password. Example: secret123

login

Example request:
curl --request POST \
    "http://localhost:8000/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"admin@gmail.com\",
    \"password\": \"123456\"
}"
const url = new URL(
    "http://localhost:8000/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "admin@gmail.com",
    "password": "123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "User login successful",
  "access_token": "1|X1Y2Z3TOKENEXAMPLE",
  "token_type": "Bearer",
  "account_type": "user",
  "role": "admin",
  "user": {
    "id": 1,
    "name": "John Doe",
    "email": "johndoe@example.com",
    ...
  },
  "redirect_url": "http://yourapp.com/workspaces/edit/1"
}
 

Example response (401):


{
    "error": true,
    "message": "Invalid credentials. Please try again."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ]
    }
}
 

Example response (429):


{
    "error": true,
    "message": "Too many login attempts. Please try again in 60 seconds."
}
 

Example response (500):


{
    "error": true,
    "message": "An unexpected error occurred. Please try again later."
}
 

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email address of the account. Example: admin@gmail.com

password   string   

The password for the account. Example: 123456

Send Password Reset Link

This endpoint sends a password reset link to the given email address if it belongs to a registered user or client.

Example request:
curl --request POST \
    "http://localhost:8000/api/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"user@example.com\"
}"
const url = new URL(
    "http://localhost:8000/api/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "user@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Password reset link emailed successfully."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Password reset link couldn't be sent, please check email settings."
}
 

Example response (500):


{
    "error": true,
    "message": "Password reset link couldn't be sent, please configure email settings."
}
 

Request      

POST api/forgot-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email address of the user or client. Example: user@example.com

Reset Password (API)

Reset a user's or client's password using a valid token. This is used after the user clicks a reset link in their email.

Example request:
curl --request POST \
    "http://localhost:8000/api/reset-password" \
    --header "workspace_id: integer required The ID of the workspace the user belongs to. Example: 1" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"token\": \"abc123\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"newPassword123\",
    \"password_confirmation\": \"newPassword123\",
    \"account_type\": \"user\"
}"
const url = new URL(
    "http://localhost:8000/api/reset-password"
);

const headers = {
    "workspace_id": "integer required The ID of the workspace the user belongs to. Example: 1",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "token": "abc123",
    "email": "john.doe@example.com",
    "password": "newPassword123",
    "password_confirmation": "newPassword123",
    "account_type": "user"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Password reset successful.",
    "data": []
}
 

Example response (422):


{
    "error": true,
    "message": "This password reset token is invalid.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "An unexpected error occurred.",
    "data": {
        "error": "Exception message here"
    }
}
 

Request      

POST api/reset-password

Headers

workspace_id      

Example: integer required The ID of the workspace the user belongs to. Example: 1

Accept      

Example: application/json

Content-Type      

Example: application/json

Body Parameters

token   string   

The password reset token from the reset email. Example: abc123

email   string   

The email of the user or client. Example: john.doe@example.com

password   string   

The new password (min 6 characters). Example: newPassword123

password_confirmation   string   

Must match the password field. Example: newPassword123

account_type   string   

Type of account: user or client. Example: user

Dashboard

Retrieves a paginated list of users who have work anniversaries (based on their date of joining) within a specified number of upcoming days. This endpoint supports filtering, sorting, searching, and pagination.

Get Upcoming Birthdays

requires authentication

This endpoint retrieves a list of users within the current workspace whose birthdays are coming up within the next given number of days (default is 30). It calculates the number of days left for each birthday and includes user details like name, photo, age, and profile link.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/upcoming-birthdays?upcoming_days=15&isApi=1" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/upcoming-birthdays"
);

const params = {
    "upcoming_days": "15",
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Upcoming birthdays fetched successfully.",
    "data": {
        "data": [
            {
                "id": 5,
                "member": "John Doe",
                "dob": "1995-07-18",
                "days_left": 12,
                "age": 28,
                "photo": "http://example.com/storage/photos/user5.jpg",
                "profile_url": "http://example.com/users/5"
            }
        ],
        "total": 1
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Internal Server Error: Something went wrong.",
    "data": [],
    "status_code": 500
}
 

Request      

GET api/master-panel/upcoming-birthdays

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Query Parameters

upcoming_days   integer  optional  

Optional. Number of upcoming days to look for birthdays. Defaults to 30. Example: 15

isApi   boolean  optional  

Optional. Pass true to get formatted API response. Example: true

Get Upcoming Work Anniversaries

requires authentication

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/upcoming-work-anniversaries?search=John&sort=doj&order=ASC&upcoming_days=30&user_id=15&limit=10" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/upcoming-work-anniversaries"
);

const params = {
    "search": "John",
    "sort": "doj",
    "order": "ASC",
    "upcoming_days": "30",
    "user_id": "15",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "rows": [
        {
            "id": 1,
            "member": "Alice Smith 🥳<ul class='list-unstyled users-list m-0 avatar-group d-flex align-items-center'><a href='http://example.com/users/1' target='_blank'><li class='avatar avatar-sm pull-up' title='Alice Smith'><img src='http://example.com/storage/photos/alice.jpg' alt='Avatar' class='rounded-circle'>",
            "wa_date": "2025-05-19 <span class='badge bg-success'>Today</span>",
            "days_left": 0
        }
    ],
    "total": 25
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "order": [
            "The selected order is invalid. Must be ASC or DESC."
        ],
        "sort": [
            "The selected sort field is invalid."
        ],
        "upcoming_days": [
            "The upcoming_days must be an integer."
        ],
        "limit": [
            "The limit must be a positive integer."
        ]
    }
}
 

Example response (500):


{
    "status": false,
    "message": "Internal server error. Please try again later."
}
 

Request      

GET api/master-panel/upcoming-work-anniversaries

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Query Parameters

search   string  optional  

Optional. Search term to filter users by first name, last name, full name, or date of joining. Example: John

sort   string  optional  

Optional. Field to sort by. Default is "doj". Example: doj

order   string  optional  

Optional. Sort order: ASC or DESC. Default is "ASC". Example: ASC

upcoming_days   integer  optional  

Optional. Number of upcoming days to check. Default is 30. Example: 30

user_id   integer  optional  

Optional. Filter by a specific user ID. Example: 15

limit   integer  optional  

Optional. Number of results per page. Default is 15. Example: 10

Get Members on Leave (Filtered & Paginated)

requires authentication

Returns a paginated list of users who are currently on leave or scheduled to be on leave within a specified number of upcoming days. Supports filtering by search term, sorting, user ID, and respects permission-based visibility for the requesting user.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/members-on-leave?search=Jane&sort=from_date&order=DESC&upcoming_days=15&user_id=5&limit=10" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/members-on-leave"
);

const params = {
    "search": "Jane",
    "sort": "from_date",
    "order": "DESC",
    "upcoming_days": "15",
    "user_id": "5",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "rows": [
        {
            "id": 12,
            "member": "John Doe <ul class='list-unstyled users-list ...'>...</ul>",
            "from_date": "Mon, May 20, 2025",
            "to_date": "Tue, May 21, 2025",
            "type": "<span class='badge bg-primary'>Full</span>",
            "duration": "2 days",
            "days_left": 1
        }
    ],
    "total": 15
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "order": [
            "The selected order is invalid. Allowed values are ASC or DESC."
        ],
        "sort": [
            "The selected sort field is invalid."
        ],
        "upcoming_days": [
            "The upcoming_days must be an integer."
        ],
        "limit": [
            "The limit must be a positive integer."
        ]
    }
}
 

Example response (500):


{
    "status": false,
    "message": "Internal server error. Please try again later."
}
 

Request      

GET api/master-panel/members-on-leave

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Query Parameters

search   string  optional  

Optional. Search by first name or last name. Example: Jane

sort   string  optional  

Optional. Field to sort by. Default is from_date. Example: from_date

order   string  optional  

Optional. Sort direction. Must be "ASC" or "DESC". Default is "ASC". Example: DESC

upcoming_days   integer  optional  

Optional. Number of upcoming days to include. Default is 30. Example: 15

user_id   integer  optional  

Optional. Filter by a specific user ID. Example: 5

limit   integer  optional  

Optional. Number of records per page. Default is 15. Example: 10

Project Managemant

This endpoint retrieves one specific project if an ID is provided, or returns a paginated list of projects based on applied filters such as status, users, clients, date range, search terms, and favorite flag.

Get Project(s)

requires authentication

Fetch a single project by ID or a list of projects with optional filters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/projects/23?search=redesign&sort=title&order=asc&limit=5&offset=10&status=1&user_id=2&client_id=1&project_start_date_from=2025-01-01&project_start_date_to=2025-12-31&project_end_date_from=2025-01-01&project_end_date_to=2025-12-31&is_favorites=1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/23"
);

const params = {
    "search": "redesign",
    "sort": "title",
    "order": "asc",
    "limit": "5",
    "offset": "10",
    "status": "1",
    "user_id": "2",
    "client_id": "1",
    "project_start_date_from": "2025-01-01",
    "project_start_date_to": "2025-12-31",
    "project_end_date_from": "2025-01-01",
    "project_end_date_to": "2025-12-31",
    "is_favorites": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Single project found):


{
    "error": false,
    "message": "Project retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 23,
            "title": "this is A projects",
            "task_count": 0,
            "status": "Open",
            "status_id": 1,
            "priority": "low",
            "priority_id": 2,
            "users": [
                {
                    "id": 2,
                    "first_name": "herry",
                    "last_name": "porter",
                    "email": "admin@gmail.com",
                    "photo": "http://localhost:8000/storage/photos/no-image.jpg"
                }
            ],
            "user_id": [
                2
            ],
            "clients": [
                {
                    "id": 1,
                    "first_name": "jerry",
                    "last_name": "ginny",
                    "email": "jg@gmail.com",
                    "photo": "http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg"
                }
            ],
            "client_id": [
                1
            ],
            "tags": [
                {
                    "id": 1,
                    "title": ".first tag"
                }
            ],
            "tag_ids": [
                1
            ],
            "start_date": "2025-05-20",
            "end_date": "2025-05-25",
            "budget": "5000.00",
            "task_accessibility": "private",
            "description": "Project description here...",
            "note": "Internal note",
            "favorite": false,
            "client_can_discuss": null,
            "created_at": "2025-05-20",
            "updated_at": "2025-05-20"
        }
    ]
}
 

Example response (404, Project not found):


{
    "error": true,
    "message": "Project not found",
    "total": 0,
    "data": []
}
 

Example response (500, Unexpected error):


{
    "error": "Some error message",
    "message": "Lead Couldn't Created.",
    "line": 143,
    "file": "/app/Http/Controllers/ProjectController.php"
}
 

Request      

GET api/master-panel/projects/{id?}

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the project to retrieve. If provided, other filters are ignored. Example: 23

Query Parameters

search   string  optional  

optional Search by project title, description, or ID. Example: redesign

sort   string  optional  

optional Column to sort by. Default is created_at. Example: title

order   string  optional  

optional Sort order. Accepts asc or desc. Default is desc. Example: asc

limit   integer  optional  

optional Number of results per page. Default is 10. Example: 5

offset   integer  optional  

optional Offset for pagination. Default is 0. Example: 10

status   integer  optional  

optional Filter by status ID. Example: 1

user_id   integer  optional  

optional Filter by user ID (assigned user). Example: 2

client_id   integer  optional  

optional Filter by client ID. Example: 1

project_start_date_from   string  optional  

date optional Filter by project start date from (YYYY-MM-DD). Example: 2025-01-01

project_start_date_to   string  optional  

date optional Filter by project start date to (YYYY-MM-DD). Example: 2025-12-31

project_end_date_from   string  optional  

date optional Filter by project end date from (YYYY-MM-DD). Example: 2025-01-01

project_end_date_to   string  optional  

date optional Filter by project end date to (YYYY-MM-DD). Example: 2025-12-31

is_favorites   boolean  optional  

optional Filter for favorite projects. Accepts 1 or 0. Example: true

Create a new project

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/projects" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Website Redesign\",
    \"status_id\": 1,
    \"priority_id\": 4,
    \"start_date\": \"2025-05-01\",
    \"end_date\": \"2025-05-31\",
    \"budget\": \"5000\",
    \"task_accessibility\": \"project_users\",
    \"description\": \"A complete redesign of the company website.\",
    \"note\": \"Client prefers Figma for designs.\",
    \"enable_tasks_time_entries\": true,
    \"user_id\": [
        1,
        2,
        3
    ],
    \"client_id\": [
        1,
        43
    ],
    \"tag_ids\": [
        1
    ],
    \"isApi\": true,
    \"workspace_id\": 17
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "title": "Website Redesign",
    "status_id": 1,
    "priority_id": 4,
    "start_date": "2025-05-01",
    "end_date": "2025-05-31",
    "budget": "5000",
    "task_accessibility": "project_users",
    "description": "A complete redesign of the company website.",
    "note": "Client prefers Figma for designs.",
    "enable_tasks_time_entries": true,
    "user_id": [
        1,
        2,
        3
    ],
    "client_id": [
        1,
        43
    ],
    "tag_ids": [
        1
    ],
    "isApi": true,
    "workspace_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
    "error": false,
    "message": "Project created successfully.",
    "id": 85,
    "data": {
        "id": 85,
        "title": "Website Redesign",
        "task_count": 0,
        "status": "Open",
        "status_id": 1,
        "priority": "high",
        "priority_id": 1,
        "users": [
            {
                "id": 1,
                "first_name": "super",
                "last_name": "Admin",
                "email": "superadmin@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            }
        ],
        "user_id": [
            1,
            2,
            3
        ],
        "clients": [
            {
                "id": 1,
                "first_name": "jerry",
                "last_name": "ginny",
                "email": "jg@gmail.com",
                "photo": "http://localhost:8000/storage/photos/sample.jpg"
            }
        ],
        "client_id": [
            1,
            28
        ],
        "tags": [
            {
                "id": 1,
                "title": ".first tag"
            }
        ],
        "tag_ids": [
            1
        ],
        "start_date": "2025-05-01",
        "end_date": "2025-05-31",
        "budget": "5000",
        "task_accessibility": "project_users",
        "description": "A complete redesign of the company website.",
        "note": "Client prefers Figma for designs.",
        "favorite": false,
        "client_can_discuss": null,
        "created_at": "2025-05-30",
        "updated_at": "2025-05-30"
    }
}
 

Example response (403, Unauthorized status change):


{
    "error": true,
    "message": "You are not authorized to set this status.",
    "data": [],
    "code": 403
}
 

Example response (422, Validation errors):


{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "status_id": [
            "The status field is required."
        ],
        "start_date": [
            "The start date must be before end date."
        ],
        "budget": [
            "The budget format is invalid."
        ]
    }
}
 

Example response (500, Unexpected server error):


{
    "error": true,
    "message": "Something went wrong while creating the project.",
    "code": 500
}
 

Request      

POST api/master-panel/projects

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the project. Example: Website Redesign

status_id   integer   

The status ID for the project. Must exist in statuses table. Example: 1

priority_id   integer  optional  

The priority ID. Must exist in priorities table. Example: 4

start_date   string  optional  

The project start date in Y-m-d format. Must be before or equal to end_date. Example: 2025-05-01

end_date   string  optional  

The project end date in Y-m-d format. Must be after or equal to start_date. Example: 2025-05-31

budget   string  optional  

The budget amount (formatted string or numeric). Example: 5000

task_accessibility   string   

Must be either project_users or assigned_users. Example: project_users

description   string  optional  

Project description (optional). Example: A complete redesign of the company website.

note   string  optional  

Internal note (optional). Example: Client prefers Figma for designs.

enable_tasks_time_entries   boolean  optional  

Whether time entries are enabled. Example: true

user_id   integer[]   

Array of user IDs to assign.

client_id   integer[]   

Array of client IDs to assign.

tag_ids   integer[]   

Array of tag IDs to attach.

isApi   boolean  optional  

Optional flag to determine API-specific behavior. Example: true

workspace_id   integer  optional  

Workspace Id . Must exist in wprkspaces table . example:2 Example: 17

Update an existing project.

requires authentication

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/projects/consequatur?isApi=1" \
    --header "workspace_id: 2" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 111,
    \"title\": \"\\\"Website Redesign\\\"\",
    \"status_id\": 1,
    \"priority_id\": 4,
    \"budget\": 5000,
    \"start_date\": \"2025-05-01\",
    \"end_date\": \"2025-05-31\",
    \"task_accessibility\": \"project_users\",
    \"description\": \"\\\"A complete redesign of the company website.\\\"\",
    \"note\": \"\\\"Client prefers Figma for designs.\\\"\",
    \"user_id\": [
        1,
        2,
        3
    ],
    \"client_id\": [
        1,
        43
    ],
    \"tag_ids\": [
        1
    ],
    \"enable_tasks_time_entries\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/consequatur"
);

const params = {
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "id": 111,
    "title": "\"Website Redesign\"",
    "status_id": 1,
    "priority_id": 4,
    "budget": 5000,
    "start_date": "2025-05-01",
    "end_date": "2025-05-31",
    "task_accessibility": "project_users",
    "description": "\"A complete redesign of the company website.\"",
    "note": "\"Client prefers Figma for designs.\"",
    "user_id": [
        1,
        2,
        3
    ],
    "client_id": [
        1,
        43
    ],
    "tag_ids": [
        1
    ],
    "enable_tasks_time_entries": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
    "error": false,
    "message": "Project updated successfully.",
    "id": 111,
    "data": {
        "id": 111,
        "title": "updated",
        "task_count": 0,
        "status": "Open",
        "status_id": 1,
        "priority": "r",
        "priority_id": 4,
        "users": [
            {
                "id": 2,
                "first_name": "herry",
                "last_name": "porter",
                "email": "admin@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            }
        ],
        "user_id": [
            2
        ],
        "clients": [],
        "client_id": [],
        "tags": [
            {
                "id": 1,
                "title": "first tag"
            }
        ],
        "tag_ids": [
            1
        ],
        "start_date": "2025-05-01",
        "end_date": "2025-05-31",
        "budget": "5000",
        "task_accessibility": "project_users",
        "description": "A complete redesign of the company website.",
        "note": "Client prefers Figma for designs.",
        "favorite": 0,
        "client_can_discuss": null,
        "created_at": "2025-06-09",
        "updated_at": "2025-06-09"
    }
}
 

Example response (422, Validation failed):


{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500, Unexpected error):


{
    "error": true,
    "message": "An error occurred while updating the project."
}
 

Request      

PUT api/master-panel/projects/{id}

Headers

workspace_id      

Example: 2

Accept      

Example: application/json

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the project. Example: consequatur

Query Parameters

isApi   boolean  optional  

Optional. Set to true if you want API formatted response. Example: true

Body Parameters

id   integer   

The ID of the project to update. Example: 111

title   string   

The title of the project. Example: "Website Redesign"

status_id   integer   

The ID of the status to assign. Example: 1

priority_id   integer  optional  

The ID of the priority to assign. Nullable. Example: 4

budget   integer  optional  

The budget allocated to the project. Nullable. Example: 5000

start_date   date   

The start date of the project. Must be before or equal to end_date. Format: Y-m-d. Example: 2025-05-01

end_date   date   

The end date of the project. Format: Y-m-d. Example: 2025-05-31

task_accessibility   string   

The task accessibility setting. Example: project_users

description   string  optional  

A brief description of the project. Nullable. Example: "A complete redesign of the company website."

note   string  optional  

Additional notes for the project. Nullable. Example: "Client prefers Figma for designs."

user_id   integer[]   

Array of user IDs to assign.

client_id   integer[]   

Array of client IDs to assign.

tag_ids   integer[]   

Array of tag IDs to attach.

enable_tasks_time_entries   boolean  optional  

Whether to enable time entries on tasks. Example: true

Delete a project.

This endpoint deletes a project by its ID. It also removes all associated comments and their attachments. Files are permanently removed from the public storage disk.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/projects/85" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/85"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Project deleted successfully.",
    "id": "85",
    "title": "this is updated",
    "data": []
}
 

Example response (404, Project not found):


{
    "error": true,
    "message": "Project not found.",
    "data": []
}
 

Example response (500, Unexpected error):


{
    "error": true,
    "message": "An unexpected error occurred while deleting the project.",
    "exception": "Exception message",
    "line": 123,
    "file": "path/to/file"
}
 

Request      

DELETE api/master-panel/projects/{id}

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project to delete. Example: 85

Delete multiple projects.

requires authentication

This endpoint allows you to delete multiple projects by providing their IDs. All related comments and attachments will also be permanently deleted.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/destroy-multiple-projects" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/destroy-multiple-projects"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Project(s) deleted successfully.",
    "ids": [
        1,
        2,
        3
    ],
    "titles": [
        "Project A",
        "Project B",
        "Project C"
    ]
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids": [
            "The ids field is required."
        ]
    }
}
 

Request      

DELETE api/master-panel/destroy-multiple-projects

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

ids   string[]   

An array of project IDs to delete.

*   integer   

Each ID must exist in the projects table. Example: 17

Update the favorite status of a project.

requires authentication

This endpoint updates whether a project is marked as a favorite or not. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/update_favorite/17" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_favorite\": 17
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update_favorite/17"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "is_favorite": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Project favorite status updated successfully",
    "data": {
        "id": 438,
        "title": "Res Test",
        "status": "Default",
        "priority": "dsfdsf",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 103,
                "first_name": "Test",
                "last_name": "Test",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "tags": [
            {
                "id": 45,
                "title": "Tag from update project"
            }
        ],
        "start_date": null,
        "end_date": null,
        "budget": "1000.00",
        "task_accessibility": "assigned_users",
        "description": null,
        "note": null,
        "favorite": 1,
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "12-08-2024 13:36:10"
    }
}
 

Example response (200):


{
    "error": true,
    "message": "Project not found",
    "data": []
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "is_favorite": [
            "The is favorite field must be either 0 or 1."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while updating the favorite status."
}
 

Request      

POST api/master-panel/update_favorite/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project to update. Example: 17

Body Parameters

is_favorite   integer   

Indicates whether the project is a favorite. Use 1 for true and 0 for false. Example: 17

Duplicate a project.

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/projects/12/duplicate?title=New+Project+Copy&reload=1" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/12/duplicate"
);

const params = {
    "title": "New Project Copy",
    "reload": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Project duplicated successfully.",
    "id": 12
}
 

Example response (400):


{
    "error": true,
    "message": "Project duplication failed."
}
 

Request      

POST api/master-panel/projects/{id}/duplicate

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project to duplicate. Example: 12

Query Parameters

title   string  optional  

Optional. A new title for the duplicated project. Example: New Project Copy

reload   boolean  optional  

Optional. If true, flashes a session message. Example: true

Project Media

Upload media files to a specific project.

This endpoint allows uploading one or multiple media files associated with a project.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/projects/upload-media" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: multipart/form-data" \
    --form "id=15"\
    --form "media_files[]=@C:\Users\Rahul Soneji\AppData\Local\Temp\php2BC3.tmp" 
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/upload-media"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "multipart/form-data",
};

const body = new FormData();
body.append('id', '15');
body.append('media_files[]', document.querySelector('input[name="media_files[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Media uploaded successfully.",
    "id": [
        6,
        7
    ],
    "data": [
        {
            "id": 6,
            "name": "maxresdefault",
            "file_name": "maxresdefault.jpg",
            "file_size": 72106,
            "file_type": "image/jpeg",
            "created_at": "2025-06-02",
            "updated_at": "2025-06-02"
        },
        {
            "id": 7,
            "name": "screenshot",
            "file_name": "screenshot.png",
            "file_size": 45000,
            "file_type": "image/png",
            "created_at": "2025-06-02",
            "updated_at": "2025-06-02"
        }
    ]
}
 

Example response (400):


{
    "error": true,
    "message": "No file(s) chosen."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "media_files.0": [
            "The media files.0 may not be greater than 2048 kilobytes."
        ],
        "id": [
            "The selected id is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": "Detailed exception message here",
    "message": "Project could not be created.",
    "line": 123,
    "file": "/path/to/file.php"
}
 

Request      

POST api/master-panel/projects/upload-media

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: multipart/form-data

Body Parameters

id   integer   

The ID of the project to attach media to. Example: 15

media_files[]   file   

One or more files to upload (multipart/form-data). Example: C:\Users\Rahul Soneji\AppData\Local\Temp\php2BC3.tmp

Get project media files

Retrieves all media files uploaded to a specific project. Supports sorting and filtering. Returns a formatted list of media with file URL, preview, and action buttons.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/projects/1/media?search=report&sort=file_name&order=asc&isApi=1" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/1/media"
);

const params = {
    "search": "report",
    "sort": "file_name",
    "order": "asc",
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Success - API response):


{
    "error": false,
    "message": "Media retrieved successfully.",
    "data": [
        {
            "id": 4,
            "file": "<a href=\"http://localhost:8000/storage/project-media/images.jpg\" data-lightbox=\"project-media\"> <img src=\"http://localhost:8000/storage/project-media/images.jpg\" alt=\"images.jpg\" width=\"50\"></a>",
            "file_name": "images.jpg",
            "file_size": "11.89 KB",
            "created_at": "2025-06-02",
            "updated_at": "2025-06-02",
            "actions": [
                "<a href=\"http://localhost:8000/storage/project-media/images.jpg\" title=Download download><i class=\"bx bx-download bx-sm\"></i></a><button title=Delete type=\"button\" class=\"btn delete\" data-id=\"4\" data-type=\"project-media\" data-table=\"project_media_table\"><i class=\"bx bx-trash text-danger\"></i></button>"
            ]
        }
    ]
}
 

Example response (200, Success - Non-API JSON table response):


{
  "rows": [
    {
      "id": 4,
      "file": "<a href=\"http://localhost:8000/storage/project-media/images.jpg\" data-lightbox=\"project-media\"> <img src=\"http://localhost:8000/storage/project-media/images.jpg\" alt=\"images.jpg\" width=\"50\"></a>",
      "file_name": "images.jpg",
      "file_size": "11.89 KB",
      "created_at": "2025-06-02",
      "updated_at": "2025-06-02",
      "actions": [
        "<a href=\"http://localhost:8000/storage/project-media/images.jpg\" title=Download download><i class=\"bx bx-download bx-sm\"></i></a><button title=Delete type=\"button" class="btn delete" data-id="4" data-type="project-media" data-table="project_media_table"><i class="bx bx-trash text-danger"></i></button>"
      ]
    }
  ],
  "total": 1
}
 

Example response (404, Project not found):


{
    "message": "No query results for model [App\\Models\\Project] 99"
}
 

Request      

GET api/master-panel/projects/{id}/media

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project. Example: 1

Query Parameters

search   string  optional  

Optional. Search term to filter media by ID, file name, or creation date. Example: report

sort   string  optional  

Optional. Field to sort by (e.g., id, file_name). Default: id. Example: file_name

order   string  optional  

Optional. Sorting order: asc or desc. Default: desc. Example: asc

isApi   boolean  optional  

Optional. When true, returns a formatted API response instead of JSON table structure. Example: true

Delete a single media file by ID.

Deletes a media file record and its associated file from storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/media/consequatur" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/media/consequatur"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "File deleted successfully.",
    "id": 101,
    "title": "example.jpg",
    "parent_id": 15,
    "type": "media",
    "parent_type": "project"
}
 

Example response (404, Media Not Found):


{
    "error": true,
    "message": "File not found."
}
 

Request      

DELETE api/master-panel/media/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the medium. Example: consequatur

mediaId   integer   

The ID of the media file to delete. Example: 101

Delete multiple media files by their IDs.

Accepts an array of media IDs to delete multiple media files in a single request.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/media/delete-multiple" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"ids\": [
        101,
        102,
        103
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/media/delete-multiple"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "ids": [
        101,
        102,
        103
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Files(s) deleted successfully.",
    "id": [
        101,
        102
    ],
    "titles": [
        "example1.jpg",
        "example2.png"
    ],
    "parent_id": [
        15,
        15
    ],
    "type": "media",
    "parent_type": "project"
}
 

Example response (422, Validation Error):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids": [
            "The ids field is required."
        ],
        "ids.0": [
            "The selected ids.0 is invalid."
        ]
    }
}
 

Request      

POST api/master-panel/media/delete-multiple

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

ids   string[]   

Array of media IDs to delete.

*   integer   

Each media ID must exist in the media table. Example: 17

Project Milestones

This API returns either a single milestone (if an id is provided) or a paginated list of milestones. It supports filtering by title, description, status, and date ranges. Sorting and pagination are also supported.

Create a new milestone for a project

This endpoint allows users to create a milestone under a specific project.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/create-milestone" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"project_id\": 5,
    \"title\": \"Final Design Review\",
    \"status\": \"incomplete\",
    \"start_date\": \"2025-06-10\",
    \"end_date\": \"2025-06-20\",
    \"cost\": \"2000.50\",
    \"description\": \"All screens finalized and approved by client.\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/create-milestone"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "project_id": 5,
    "title": "Final Design Review",
    "status": "incomplete",
    "start_date": "2025-06-10",
    "end_date": "2025-06-20",
    "cost": "2000.50",
    "description": "All screens finalized and approved by client."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Milestone created successfully.",
    "data": {
        "id": 12,
        "type": "milestone",
        "parent_type": "project",
        "parent_id": 5
    }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "project_id": [
            "The project_id field is required."
        ],
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Milestone couldn't be created: Milestone creation failed due to mass assignment or DB error."
}
 

Request      

POST api/master-panel/create-milestone

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

project_id   integer   

The ID of the project the milestone belongs to. Example: 5

title   string   

The title of the milestone. Example: Final Design Review

status   string   

The status of the milestone. Must be one of: incomplete, complete, pending. Example: incomplete

start_date   string   

The start date of the milestone in the current PHP date format. Must be before or equal to end_date. Example: 2025-06-10

end_date   string   

The end date of the milestone. Example: 2025-06-20

cost   string   

The cost of the milestone. Example: 2000.50

description   string  optional  

The description of the milestone (optional). Example: All screens finalized and approved by client.

Get milestone(s) (single or list)

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/get-milestones/3?search=Review&status=complete&start_date_from=2025-06-01&start_date_to=2025-06-30&end_date_from=2025-07-01&end_date_to=2025-07-31&sort=title&order=asc&limit=20" \
    --header "workspace_id: integer required The ID of the workspace context. Example: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/get-milestones/3"
);

const params = {
    "search": "Review",
    "status": "complete",
    "start_date_from": "2025-06-01",
    "start_date_to": "2025-06-30",
    "end_date_from": "2025-07-01",
    "end_date_to": "2025-07-31",
    "sort": "title",
    "order": "asc",
    "limit": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "integer required The ID of the workspace context. Example: 2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Milestones retrieved successfully.",
    "data": [
        {
            "id": 3,
            "title": "Final Review",
            "status": "complete",
            "start_date": "2025-06-01",
            "end_date": "2025-06-15",
            "cost": "1500.00",
            "progress": 100,
            "description": "Final phase of project delivery."
        }
    ],
    "total": 1,
    "page": 1,
    "limit": 10
}
 

Example response (404):


{
    "error": true,
    "message": "Milestone not found.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "Error: Unexpected exception message",
    "data": {
        "line": 123,
        "file": "path/to/file.php"
    }
}
 

Request      

GET api/master-panel/get-milestones/{id?}

Headers

workspace_id      

Example: integer required The ID of the workspace context. Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the milestone to retrieve. If provided, other filters are ignored. Example: 3

Query Parameters

search   string  optional  

optional A keyword to search by milestone title, description, or ID. Example: Review

status   string  optional  

optional Filter by milestone status. Example: complete

start_date_from   string  optional  

date optional Filter milestones starting from this date (Y-m-d). Example: 2025-06-01

start_date_to   string  optional  

date optional Filter milestones starting up to this date (Y-m-d). Example: 2025-06-30

end_date_from   string  optional  

date optional Filter milestones ending from this date (Y-m-d). Example: 2025-07-01

end_date_to   string  optional  

date optional Filter milestones ending up to this date (Y-m-d). Example: 2025-07-31

sort   string  optional  

optional Field to sort by. Defaults to id. Example: title

order   string  optional  

optional Sort direction (asc or desc). Defaults to desc. Example: asc

limit   integer  optional  

optional Number of records per page. Defaults to 10. Example: 20

Update an existing milestone.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/update-milestone/consequatur" \
    --header "workspace_id: integer required The ID of the workspace context. Example: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Final Review\",
    \"status\": \"complete\",
    \"start_date\": \"01-06-2025\",
    \"end_date\": \"15-06-2025\",
    \"cost\": 2000.5,
    \"progress\": 80,
    \"description\": \"Final review and delivery milestone.\",
    \"id\": 5
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update-milestone/consequatur"
);

const headers = {
    "workspace_id": "integer required The ID of the workspace context. Example: 2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Final Review",
    "status": "complete",
    "start_date": "01-06-2025",
    "end_date": "15-06-2025",
    "cost": 2000.5,
    "progress": 80,
    "description": "Final review and delivery milestone.",
    "id": 5
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Milestone updated successfully.",
    "id": 5,
    "type": "milestone",
    "parent_type": "project",
    "parent_id": 12
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid date format.",
    "exception": "InvalidArgumentException"
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Request      

PUT api/master-panel/update-milestone/{id}

Headers

workspace_id      

Example: integer required The ID of the workspace context. Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update milestone. Example: consequatur

Body Parameters

title   string   

The title of the milestone. Example: Final Review

status   string   

The current status of the milestone. Example: complete

start_date   date   

The start date in d-m-Y format. Must be before or equal to end_date. Example: 01-06-2025

end_date   date   

The end date in d-m-Y format. Example: 15-06-2025

cost   number   

The estimated cost (numbers or decimal). Example: 2000.5

progress   integer   

Progress of the milestone in percentage (0–100). Example: 80

description   string  optional  

nullable Optional description of the milestone. Example: Final review and delivery milestone.

id   integer   

The ID of the milestone to update. Example: 5

Project status and priority

This endpoint updates the status of a specified project. The status change is recorded in the status timeline, and notifications are sent to related users and clients.

You can include an optional note with the status update.

If isApi request parameter is true, response will use the standardized API response format.

Save the user's default view preference for projects.

requires authentication

This endpoint allows the authenticated user or client to set their preferred default view (e.g., kanban, list, or calendar) for how projects are displayed in the UI. The view preference is stored in the user_client_preferences table.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/save-view-preference" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"view\": \"kanban\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/save-view-preference"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "view": "kanban"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Default View Set Successfully."
}
 

Example response (400):


{
    "error": true,
    "message": "Something Went Wrong."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "view": [
            "The view field is required."
        ]
    }
}
 

Request      

POST api/master-panel/save-view-preference

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

view   string   

The preferred default view type. Valid options might include "kanban", "list", or "calendar". Example: kanban

Update the status of a project.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/update-status/consequatur" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 438,
    \"statusId\": 5,
    \"note\": \"consequatur\",
    \"isApi\": false
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update-status/consequatur"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "id": 438,
    "statusId": 5,
    "note": "consequatur",
    "isApi": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": 438,
    "type": "project",
    "old_status": "Default",
    "new_status": "Completed",
    "activity_message": "John Doe updated project status from Default to Completed",
    "data": {
        "id": 438,
        "title": "Res Test",
        "status": "Completed",
        "priority": "High",
        "users": [
            {
                "id": 7,
                "first_name": "John",
                "last_name": "Doe",
                "photo": "https://example.com/photos/johndoe.png"
            }
        ],
        "clients": [
            {
                "id": 103,
                "first_name": "Client",
                "last_name": "Name",
                "photo": "https://example.com/photos/no-image.jpg"
            }
        ],
        "tags": [
            {
                "id": 45,
                "title": "Important"
            }
        ],
        "start_date": "07-08-2024 14:38:51",
        "end_date": "12-08-2024 13:49:33",
        "budget": "1000.00",
        "task_accessibility": "assigned_users",
        "description": null,
        "note": "Project on track",
        "favorite": 1,
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "12-08-2024 13:49:33"
    }
}
 

Example response (403):


{
    "error": true,
    "message": "You are not authorized to set this status."
}
 

Example response (500):


{
    "error": true,
    "message": "Status couldn't be updated."
}
 

Example response (500):


{
    "error": true,
    "message": "Error: Exception message here",
    "line": 123,
    "file": "/path/to/file.php"
}
 

Request      

PUT api/master-panel/update-status/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the update status. Example: consequatur

Body Parameters

id   integer   

The ID of the project to update. Example: 438

statusId   integer   

The ID of the new status to set. Example: 5

note   string  optional  

Optional note about the status update. Example: consequatur

isApi   boolean  optional  

Optional flag to specify if the request is API (true or false). Defaults to false. Example: false

Update the priority of a project.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/update-priority/consequatur" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 123,
    \"priorityId\": \"5\",
    \"note\": \"\\\"Urgent priority needed\\\"\",
    \"isApi\": false
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update-priority/consequatur"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "id": 123,
    "priorityId": "5",
    "note": "\"Urgent priority needed\"",
    "isApi": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Priority updated successfully.",
  "id": 123,
  "type": "project",
  "old_priority": "Medium",
  "new_priority": "High",
  "activity_message": "John Doe updated project priority from Medium to High",
  "data": {
    // Detailed formatted project data as returned by formatProject helper
  }
}
 

Example response (403):


{
    "error": true,
    "message": "You are not authorized to update this priority."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "priorityId": [
            "The selected priority id is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Error: Exception message here",
    "line": 45,
    "file": "/path/to/file.php"
}
 

Request      

PUT api/master-panel/update-priority/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the update priority. Example: consequatur

Body Parameters

id   integer   

The ID of the project to update. Example: 123

priorityId   int|null  optional  

The ID of the new priority to set. Pass null to reset. Example: 5

note   string|null  optional  

Optional note related to the priority update. Example: "Urgent priority needed"

isApi   boolean  optional  

Optional flag (true/false) indicating if the request expects an API-formatted response. Default is false. Example: false

Project Comments

Add a comment.

This endpoint allows the authenticated user to post a comment on any model (like a project or task) using polymorphic relationships. It supports file attachments (images, PDFs, documents) and also handles user mentions (e.g., @username), sending notifications to mentioned users.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/project/comments" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "model_type=App\\Models\\Project"\
    --form "model_id=14"\
    --form "content=This is a comment with a mention to @jane."\
    --form "parent_id=5"\
    --form "attachments[]=@C:\Users\Rahul Soneji\AppData\Local\Temp\php2C52.tmp" 
const url = new URL(
    "http://localhost:8000/api/master-panel/project/comments"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('model_type', 'App\\Models\\Project');
body.append('model_id', '14');
body.append('content', 'This is a comment with a mention to @jane.');
body.append('parent_id', '5');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Comment Added Successfully",
    "comment": {
        "id": 21,
        "commentable_type": "App\\Models\\Project",
        "commentable_id": 14,
        "content": "This is a comment with a mention to <a href='/users/5'>@jane</a>",
        "user_id": 1,
        "parent_id": null,
        "created_at": "2025-06-12T10:31:02.000000Z",
        "updated_at": "2025-06-12T10:31:02.000000Z",
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "attachments": [
            {
                "id": 1,
                "comment_id": 21,
                "file_name": "screenshot.png",
                "file_path": "comment_attachments/screenshot.png",
                "file_type": "image/png"
            }
        ]
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "model_type": [
            "The model_type field is required."
        ],
        "content": [
            "The content field is required."
        ]
    }
}
 

Example response (500):


{
    "success": false,
    "message": "An error occurred: [error details]"
}
 

Request      

POST api/master-panel/project/comments

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

model_type   string   

The fully qualified model class name. Example: App\\Models\\Project

model_id   integer   

The ID of the model being commented on. Example: 14

content   string   

The comment content. Mentions like "@john" are supported. Example: This is a comment with a mention to @jane.

parent_id   integer  optional  

Optional. The ID of the parent comment (for replies). Example: 5

attachments   file[]  optional  

Optional. Files to attach with the comment (jpg, jpeg, png, pdf, xlsx, txt, docx). Max size: 2MB per file.

Get comment by ID.

This endpoint retrieves the details of a specific comment, including any attachments associated with it.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/project/comments/21" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/project/comments/21"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "comment": {
        "id": 21,
        "commentable_type": "App\\Models\\Project",
        "commentable_id": 14,
        "content": "This is a comment with mention to <a href='/users/5'>@jane</a>",
        "user_id": 1,
        "parent_id": null,
        "created_at": "2025-06-12T10:31:02.000000Z",
        "updated_at": "2025-06-12T10:31:02.000000Z",
        "attachments": [
            {
                "id": 1,
                "comment_id": 21,
                "file_name": "report.pdf",
                "file_path": "comment_attachments/report.pdf",
                "file_type": "application/pdf"
            }
        ]
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\Comment] 99"
}
 

Request      

GET api/master-panel/project/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the comment to retrieve. Example: 21

Update a comment

This endpoint updates the content of an existing comment. It also handles user mention parsing and sends notifications to mentioned users.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/project/comments/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment_id\": 12,
    \"content\": \"\\\"Updated comment with mention to @john\\\"\",
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/project/comments/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "comment_id": 12,
    "content": "\"Updated comment with mention to @john\"",
    "isApi": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Comment updated successfully.",
    "id": 12,
    "type": "project"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "comment_id": [
            "The comment_id field is required."
        ],
        "content": [
            "The content field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Internal Server Error"
}
 

Request      

PUT api/master-panel/project/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the comment. Example: consequatur

Body Parameters

comment_id   integer   

The ID of the comment to update. Example: 12

content   string   

The new content of the comment. Mentions can be included using @username format. Example: "Updated comment with mention to @john"

isApi   boolean  optional  

Optional flag to determine if it's an API request. Example: true

Delete a comment

This endpoint permanently deletes a comment and all of its associated attachments from the storage.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/project/comments/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment_id\": 15
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/project/comments/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "comment_id": 15
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Comment deleted successfully.",
    "id": 15,
    "type": "project"
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\Comment] 15"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "comment_id": [
            "The comment_id field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Comment couldn't deleted."
}
 

Request      

DELETE api/master-panel/project/comments/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the comment. Example: consequatur

Body Parameters

comment_id   integer   

The ID of the comment to delete. Example: 15

project issues

This endpoint allows you to create a new issue related to a specific project. You must provide issue details such as title, description, status, and optional assignees. The issue will be created under the given project and notifications will be dispatched to the assignees.

Create a new issue under a project.

requires authentication

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/projects/1/issues" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Database connectivity issue\",
    \"description\": \"There is an intermittent issue connecting to the database from the API server.\",
    \"status\": \"open\",
    \"assignee_id\": [
        1,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/1/issues"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Database connectivity issue",
    "description": "There is an intermittent issue connecting to the database from the API server.",
    "status": "open",
    "assignee_id": [
        1,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Issue created successfully.",
    "data": {
        "id": 17,
        "project_id": 5,
        "title": "Database connectivity issue",
        "description": "There is an intermittent issue connecting to the database from the API server.",
        "status": "open",
        "created_by": 2,
        "assignees": [
            {
                "id": 1,
                "name": "John Doe",
                "email": "john@example.com"
            },
            {
                "id": 3,
                "name": "Jane Smith",
                "email": "jane@example.com"
            }
        ]
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation failed.",
    "data": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Database error occurred while creating the issue.",
    "data": {
        "details": "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'project_id' cannot be null..."
    }
}
 

Request      

POST api/master-panel/projects/{project_id}/issues

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

project_id   integer   

The ID of the project. Example: 1

project   integer   

The ID of the project in which the issue is being created. Example: 5

Body Parameters

title   string   

The title of the issue. Example: Database connectivity issue

description   string   

A description of the issue. Example: There is an intermittent issue connecting to the database from the API server.

status   string   

The current status of the issue. Must be one of: open, in_progress, resolved, closed. Example: open

assignee_id   string[]  optional  

optional An array of user IDs to assign the issue to.

Update an existing issue within a project.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/projects/issues/1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 8,
    \"title\": \"Database connectivity issue\",
    \"description\": \"There is an intermittent issue connecting to the database from the API server.\",
    \"status\": \"in_progress\",
    \"assignee_id\": [
        1,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/issues/1"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "id": 8,
    "title": "Database connectivity issue",
    "description": "There is an intermittent issue connecting to the database from the API server.",
    "status": "in_progress",
    "assignee_id": [
        1,
        3
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Issue updated successfully.",
  "issue": {
    "id": 8,
    "title": "Database connectivity issue",
    "description": "There is an intermittent issue connecting to the database from the API server.",
    "status": "in_progress",
    "assignees": [...]
  }
}
 

Example response (404):


{
    "error": true,
    "message": "Issue not found."
}
 

Example response (422):


{
    "error": true,
    "message": "Validation failed.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An unexpected error occurred.",
    "details": "Exception message here"
}
 

Request      

PUT api/master-panel/projects/issues/{id}

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the issue. Example: 1

Body Parameters

id   integer   

The ID of the issue to update. Example: 8

title   string   

The updated title of the issue. Max 256 characters. Example: Database connectivity issue

description   string   

The updated description of the issue. Max 512 characters. Example: There is an intermittent issue connecting to the database from the API server.

status   string   

The current status of the issue. Must be one of: open, in_progress, resolved, closed. Example: in_progress

assignee_id   string[]  optional  

The list of user IDs to assign this issue to. Optional.

Delete an issue from a project.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/projects/issues/17" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/issues/17"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Issue deleted successfully."
}
 

Example response (404):


{
    "error": true,
    "message": "Issue not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An unexpected error occurred.",
    "details": "Exception message here"
}
 

Request      

DELETE api/master-panel/projects/issues/{id_id}

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id_id   integer   

The ID of the id. Example: 17

project   integer   

The ID of the project to which the issue belongs. Example: 5

id   integer   

The ID of the issue to delete. Example: 8

List or fetch issues (API) This endpoint returns a paginated list of issues for a given project, or a single issue by its ID if `type=issue` is provided.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/projects/issues/117?type=issue&search=bug&sort=updated_at&order=ASC&status=open&assigned_to=5&created_by=2&start_date=2025-06-01&end_date=2025-06-30&limit=20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/projects/issues/117"
);

const params = {
    "type": "issue",
    "search": "bug",
    "sort": "updated_at",
    "order": "ASC",
    "status": "open",
    "assigned_to": "5",
    "created_by": "2",
    "start_date": "2025-06-01",
    "end_date": "2025-06-30",
    "limit": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Issue list fetched successfully.",
    "rows": [
        {
            "id": 1,
            "project_id": 117,
            "title": "data not retrive",
            "description": "when Api was call data nor retrived",
            "status": "in_progress",
            "created_by": {
                "id": 2,
                "first_name": "herry",
                "last_name": "porter",
                "email": "admin@gmail.com"
            },
            "assignees": [
                {
                    "id": 2,
                    "first_name": "herry",
                    "last_name": "porter",
                    "email": "admin@gmail.com",
                    "photo": null
                }
            ],
            "created_at": "2025-06-12 03:59:42",
            "updated_at": "2025-06-12 03:59:42"
        }
    ],
    "total": 1,
    "current_page": 1,
    "last_page": 1,
    "per_page": 10
}
 

Request      

GET api/master-panel/projects/issues/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The project ID to filter issues by, or the issue ID if type=issue is set. Example: 117

Query Parameters

type   string  optional  

optional If set to 'issue', fetches a single issue by its ID. Example: issue

search   string  optional  

optional Search term for title, description, status, assignee, or creator. Example: bug

sort   string  optional  

optional Field to sort by. Default: created_at. Example: updated_at

order   string  optional  

optional Sort direction (ASC or DESC). Default: DESC. Example: ASC

status   string  optional  

optional Filter by issue status. Example: open

assigned_to   integer  optional  

optional Filter by assigned user ID. Example: 5

created_by   integer  optional  

optional Filter by creator user ID. Example: 2

start_date   string  optional  

date optional Filter issues created after this date. Example: 2025-06-01

end_date   string  optional  

date optional Filter issues created before this date. Example: 2025-06-30

limit   integer  optional  

optional Number of results per page. Default: 10. Example: 20

Task Management

This API endpoint updates a task with given details including reminders and recurring configurations. It handles:

List or Get Task(s) This endpoint returns a paginated list of tasks, or a single task if an ID is provided. It supports advanced filtering, searching, sorting, and eager loading of related entities such as users, project, status, priority, reminders, and recurring task details. If the ID is numeric, it returns a single formatted task object. If the ID follows the format `user_{id}` or `project_{id}`, it filters tasks belonging to the specified user or project.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/tasks/list-api/25?isApi=&search=Design&sort=title&order=consequatur&status_ids%5B%5D=1&priority_ids%5B%5D=2&user_ids%5B%5D=3&client_ids%5B%5D=5&project_ids%5B%5D=2&task_start_date_from=2025-06-01&task_start_date_to=2025-06-30&task_end_date_from=2025-06-05&task_end_date_to=2025-06-20&limit=20" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/list-api/25"
);

const params = {
    "isApi": "0",
    "search": "Design",
    "sort": "title",
    "order": "consequatur",
    "status_ids[]": "1",
    "priority_ids[]": "2",
    "user_ids[]": "3",
    "client_ids[]": "5",
    "project_ids[]": "2",
    "task_start_date_from": "2025-06-01",
    "task_start_date_to": "2025-06-30",
    "task_end_date_from": "2025-06-05",
    "task_end_date_to": "2025-06-20",
    "limit": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Single task response):


{
    "id": 25,
    "workspace_id": 2,
    "title": "Test Task Title",
    "status": "Open",
    "status_id": 1,
    "priority": "low",
    "priority_id": 2,
    "users": [
        {
            "id": 2,
            "first_name": "herry",
            "last_name": "porter",
            "email": "admin@gmail.com",
            "photo": "http://localhost:8000/storage/photos/no-image.jpg"
        }
    ],
    "user_id": [
        2
    ],
    "clients": [],
    "start_date": "2025-06-01",
    "due_date": "2025-06-10",
    "project": "favorite project",
    "project_id": 2,
    "description": "This is a test task description.",
    "note": "Optional note about the task.",
    "favorite": 0,
    "client_can_discuss": null,
    "created_at": "2025-05-28",
    "updated_at": "2025-05-28",
    "enable_reminder": 1,
    "last_reminder_sent": null,
    "frequency_type": "weekly",
    "day_of_week": 3,
    "day_of_month": null,
    "time_of_day": "14:30:00",
    "enable_recurring_task": 1,
    "recurrence_frequency": "monthly",
    "recurrence_day_of_week": null,
    "recurrence_day_of_month": 15,
    "recurrence_month_of_year": null,
    "recurrence_starts_from": "2025-06-01",
    "recurrence_occurrences": 6,
    "completed_occurrences": null,
    "billing_type": "billable",
    "completion_percentage": 0,
    "task_list_id": null
}
 

Example response (200, Paginated task list):


{
  "status": false,
  "message": "Tasks retrieved successfully.",
  "data": {
    "total": 25,
    "data": [
      {
        "id": 25,
        "workspace_id": 2,
        "title": "Test Task Title",
        "status": "Open",
        ...
      }
    ]
  }
}
 

Example response (404, Task not found):


{
    "message": "Task not found"
}
 

Example response (404, Project or User not found):


{
    "message": "Project not found"
}
 

Request      

GET api/master-panel/tasks/list-api/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

int|string Optional. Numeric task ID to fetch a single task, or user_{id}, project_{id} to filter by user/project. Example: 25

Query Parameters

isApi   boolean  optional  

Optional. Indicate if it's an API call. Default: false Example: false

search   string  optional  

Optional. Search tasks by title or ID. Example: Design

sort   string  optional  

Optional. Field to sort by. Default: id. Example: title

order   string  optional  

Optional. Sorting order: ASC or DESC. Default: DESC Example: consequatur

status_ids[]   integer  optional  

Optional. Filter tasks by status ID(s). Example: 1

priority_ids[]   integer  optional  

Optional. Filter tasks by priority ID(s). Example: 2

user_ids[]   integer  optional  

Optional. Filter tasks assigned to these user ID(s). Example: 3

client_ids[]   integer  optional  

Optional. Filter tasks linked to clients via project(s). Example: 5

project_ids[]   integer  optional  

Optional. Filter tasks by project ID(s). Example: 2

task_start_date_from   string  optional  

date Optional. Filter tasks starting from this date. Format: Y-m-d. Example: 2025-06-01

task_start_date_to   string  optional  

date Optional. Filter tasks starting up to this date. Format: Y-m-d. Example: 2025-06-30

task_end_date_from   string  optional  

date Optional. Filter tasks due from this date. Format: Y-m-d. Example: 2025-06-05

task_end_date_to   string  optional  

date Optional. Filter tasks due up to this date. Format: Y-m-d. Example: 2025-06-20

limit   integer  optional  

Optional. Number of results per page. Default: 10. Example: 20

Create a new task

This endpoint allows you to create a new task within a workspace and assign it to users. It supports additional features like setting reminders and recurring schedules.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/create-tasks" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Create new onboarding flow\",
    \"status_id\": 1,
    \"start_date\": \"2025-06-01\",
    \"due_date\": \"2025-06-06\",
    \"description\": \"Implement onboarding UI and logic.\",
    \"project\": 15,
    \"priority_id\": 2,
    \"note\": \"Coordinate with HR and DevOps.\",
    \"billing_type\": \"billable\",
    \"completion_percentage\": 0,
    \"users_id\": [
        2,
        3
    ],
    \"enable_reminder\": \"on\",
    \"frequency_type\": \"weekly\",
    \"day_of_week\": 2,
    \"day_of_month\": 15,
    \"time_of_day\": \"09:00\",
    \"enable_recurring_task\": \"on\",
    \"recurrence_frequency\": \"monthly\",
    \"recurrence_day_of_week\": 3,
    \"recurrence_day_of_month\": 10,
    \"recurrence_month_of_year\": 6,
    \"recurrence_starts_from\": \"2025-06-03\",
    \"recurrence_occurrences\": 5,
    \"task_list_id\": 1
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/create-tasks"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Create new onboarding flow",
    "status_id": 1,
    "start_date": "2025-06-01",
    "due_date": "2025-06-06",
    "description": "Implement onboarding UI and logic.",
    "project": 15,
    "priority_id": 2,
    "note": "Coordinate with HR and DevOps.",
    "billing_type": "billable",
    "completion_percentage": 0,
    "users_id": [
        2,
        3
    ],
    "enable_reminder": "on",
    "frequency_type": "weekly",
    "day_of_week": 2,
    "day_of_month": 15,
    "time_of_day": "09:00",
    "enable_recurring_task": "on",
    "recurrence_frequency": "monthly",
    "recurrence_day_of_week": 3,
    "recurrence_day_of_month": 10,
    "recurrence_month_of_year": 6,
    "recurrence_starts_from": "2025-06-03",
    "recurrence_occurrences": 5,
    "task_list_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Task created successfully):


{
    "error": false,
    "message": "Task created successfully.",
    "id": 28,
    "type": "task",
    "parent_id": 15,
    "parent_type": "project",
    "Data": {
        "id": 28,
        "workspace_id": 2,
        "title": "Create new onboarding flow",
        "status": "Open",
        "status_id": 1,
        "priority": "low",
        "priority_id": 2,
        "users": [
            {
                "id": 2,
                "first_name": "herry",
                "last_name": "porter",
                "email": "admin@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            },
            {
                "id": 3,
                "first_name": "John",
                "last_name": "Doe",
                "email": "admin2@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            }
        ],
        "user_id": [
            2,
            3
        ],
        "clients": [
            {
                "id": 1,
                "first_name": "jerry",
                "last_name": "ginny",
                "email": "jg@gmail.com",
                "photo": "http://localhost:8000/storage/photos/gqHsvgmDBCbtf843SRYx31e6Zl51amPZY8eG05FB.jpg"
            }
        ],
        "start_date": "2015-01-01",
        "due_date": "2025-06-06",
        "project": "New Project Title",
        "project_id": 15,
        "description": "Implement onboarding UI and logic.",
        "note": "Coordinate with HR and DevOps.",
        "favorite": 0,
        "client_can_discuss": null,
        "created_at": "2025-06-03",
        "updated_at": "2025-06-03",
        "enable_reminder": 1,
        "last_reminder_sent": null,
        "frequency_type": "weekly",
        "day_of_week": 2,
        "day_of_month": 15,
        "time_of_day": "09:00:00",
        "enable_recurring_task": 1,
        "recurrence_frequency": "monthly",
        "recurrence_day_of_week": 3,
        "recurrence_day_of_month": 10,
        "recurrence_month_of_year": 6,
        "recurrence_starts_from": "2025-06-03",
        "recurrence_occurrences": 5,
        "completed_occurrences": null,
        "billing_type": "billable",
        "completion_percentage": 0,
        "task_list_id": null
    }
}
 

Example response (422, Validation error):


{
    "error": true,
    "message": "Invalid date format. Please use yyyy-mm-dd.",
    "exception": "InvalidArgumentException message here..."
}
 

Example response (500, Unexpected server error):


{
    "error": true,
    "message": "An error occurred while creating the task. SQLSTATE[23000]: Integrity constraint violation: 1452..."
}
 

Request      

POST api/master-panel/create-tasks

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the task. Example: Create new onboarding flow

status_id   integer   

The ID of the task status. Example: 1

start_date   date   

The start date in YYYY-MM-DD format. Example: 2025-06-01

due_date   date   

The due date in YYYY-MM-DD format. Example: 2025-06-06

description   string  optional  

The description of the task. Example: Implement onboarding UI and logic.

project   integer   

The ID of the project to which the task belongs. Example: 15

priority_id   integer  optional  

The ID of the priority level. Must exist in priorities table. Example: 2

note   string  optional  

Optional note for the task. Example: Coordinate with HR and DevOps.

billing_type   string  optional  

The billing type (none, billable, non-billable). Example: billable

completion_percentage   integer   

Completion in steps of 10. One of: 0,10,...,100. Example: 0

users_id   string[]  optional  

User IDs assigned to the task.

enable_reminder   string  optional  

Enable reminders. Must be 'on' if enabled. Example: on

frequency_type   string  optional  

Frequency of reminder (daily, weekly, monthly). Example: weekly

day_of_week   integer  optional  

Day of the week for reminders (1 = Monday). Example: 2

day_of_month   integer  optional  

Day of the month for reminders. Example: 15

time_of_day   string  optional  

Time of day for reminder (HH:MM). Example: 09:00

enable_recurring_task   string  optional  

Enable recurring task. Must be 'on' if enabled. Example: on

recurrence_frequency   string  optional  

Frequency (daily, weekly, monthly, yearly). Example: monthly

recurrence_day_of_week   integer  optional  

Day of the week for recurrence. Example: 3

recurrence_day_of_month   integer  optional  

Day of the month for recurrence. Example: 10

recurrence_month_of_year   integer  optional  

Month of the year for recurrence. Example: 6

recurrence_starts_from   date  optional  

Date from which recurrence starts. Must be today or future. Example: 2025-06-03

recurrence_occurrences   integer  optional  

Number of occurrences. Example: 5

task_list_id   integer  optional  

The ID of the task list (if any). Must exist in task_lists table. Example: 1

Update an existing task.

requires authentication

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/update-tasks/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 25,
    \"title\": \"Test Task Title\",
    \"description\": \"This is a test task description.\",
    \"status_id\": 15,
    \"priority_id\": 4,
    \"start_date\": \"2025-06-01\",
    \"due_date\": \"2025-06-10\",
    \"note\": \"consequatur\",
    \"billing_type\": \"billable\",
    \"completion_percentage\": 0,
    \"user_id\": [
        2,
        3
    ],
    \"enable_reminder\": \"on\",
    \"frequency_type\": \"weekly\",
    \"day_of_week\": 3,
    \"day_of_month\": 15,
    \"time_of_day\": \"09:00\",
    \"enable_recurring_task\": \"on\",
    \"recurrence_frequency\": \"monthly\",
    \"recurrence_day_of_week\": 5,
    \"recurrence_day_of_month\": 10,
    \"recurrence_month_of_year\": 6,
    \"recurrence_starts_from\": \"2025-06-13\",
    \"recurrence_occurrences\": 12
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/update-tasks/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 25,
    "title": "Test Task Title",
    "description": "This is a test task description.",
    "status_id": 15,
    "priority_id": 4,
    "start_date": "2025-06-01",
    "due_date": "2025-06-10",
    "note": "consequatur",
    "billing_type": "billable",
    "completion_percentage": 0,
    "user_id": [
        2,
        3
    ],
    "enable_reminder": "on",
    "frequency_type": "weekly",
    "day_of_week": 3,
    "day_of_month": 15,
    "time_of_day": "09:00",
    "enable_recurring_task": "on",
    "recurrence_frequency": "monthly",
    "recurrence_day_of_week": 5,
    "recurrence_day_of_month": 10,
    "recurrence_month_of_year": 6,
    "recurrence_starts_from": "2025-06-13",
    "recurrence_occurrences": 12
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Task updated successfully.",
  "data": {
    "id": 25,
    "parent_id": 2,
    "parent_type": "project",
    "data": {
      "id": 25,
      "title": "Test Task Title",
      "status_id": 15,
      "priority_id": 4,
      "completion_percentage": 0,
      ...
    }
  }
}
 

Example response (422):


{
    "error": true,
    "message": {
        "title": [
            "The title field is required."
        ],
        "start_date": [
            "The start date must be before or equal to due date."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while updating the task. [Error Details]"
}
 

Request      

PUT api/master-panel/update-tasks/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the update task. Example: consequatur

Body Parameters

id   integer   

The ID of the task to update. Example: 25

title   string   

The title of the task. Example: Test Task Title

description   string  optional  

Optional description for the task. Example: This is a test task description.

status_id   integer   

The status ID associated with the task. Example: 15

priority_id   integer  optional  

nullable The priority ID associated with the task. Example: 4

start_date   date   

Start date of the task (must be before or equal to due_date). Example: 2025-06-01

due_date   date   

Due date of the task. Example: 2025-06-10

note   string  optional  

nullable Optional notes related to the task. Example: consequatur

billing_type   string  optional  

nullable Must be one of: none, billable, non-billable. Example: billable

completion_percentage   integer   

Completion in steps of 10. Must be between 0 and 100. Example: 0

user_id   string[]  optional  

Optional. Array of user IDs to assign to the task.

enable_reminder   string  optional  

Optional. Pass "on" to enable reminders. Example: on

frequency_type   string  optional  

Optional. Reminder frequency. One of: daily, weekly, monthly. Example: weekly

day_of_week   integer  optional  

Nullable. Day of the week if frequency is weekly (1=Monday ... 7=Sunday). Example: 3

day_of_month   integer  optional  

Nullable. Day of the month if frequency is monthly. Example: 15

time_of_day   string  optional  

Nullable. Time for the reminder (HH:MM format). Example: 09:00

enable_recurring_task   string  optional  

Optional. Pass "on" to enable recurring tasks. Example: on

recurrence_frequency   string  optional  

Optional. One of: daily, weekly, monthly, yearly. Example: monthly

recurrence_day_of_week   integer  optional  

Nullable. Used if recurrence_frequency is weekly. Example: 5

recurrence_day_of_month   integer  optional  

Nullable. Used if recurrence_frequency is monthly. Example: 10

recurrence_month_of_year   integer  optional  

Nullable. Used if recurrence_frequency is yearly. Example: 6

recurrence_starts_from   date  optional  

Nullable. Start date for recurring tasks. Must be today or future. Example: 2025-06-13

recurrence_occurrences   integer  optional  

Nullable. Number of occurrences for recurrence. Example: 12

Delete a specific task by ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/delete-tasks/23" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/delete-tasks/23"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, Task deleted successfully):


{
    "error": false,
    "message": "Task deleted successfully.",
    "data": {
        "id": 23,
        "title": "Update client onboarding flow",
        "parent_id": 2,
        "parent_type": "project",
        "data": []
    }
}
 

Example response (404, Task not found):


{
    "error": true,
    "message": "Task not found.",
    "data": []
}
 

Example response (500, Unexpected error):


{
    "error": true,
    "message": "An unexpected error occurred while deleting the task.",
    "data": []
}
 

Request      

DELETE api/master-panel/delete-tasks/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the task to delete. Example: 23

Delete multiple tasks

This endpoint deletes multiple tasks by their IDs. All associated comments and attachments are also permanently removed.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/destroy-multiple-tasks" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        101,
        102,
        103
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/destroy-multiple-tasks"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        101,
        102,
        103
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Task(s) deleted successfully.",
    "id": [
        101,
        102
    ],
    "titles": [
        "Task One",
        "Task Two"
    ],
    "parent_id": [
        5,
        6
    ],
    "parent_type": "project"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids.0": [
            "The selected ids.0 is invalid."
        ]
    }
}
 

Request      

DELETE api/master-panel/destroy-multiple-tasks

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

An array of task IDs to be deleted.

*   integer  optional  

The ID of an individual task to delete. Must exist in the tasks table. Example: 17

Duplicate a task.

This endpoint allows you to duplicate an existing task. You can optionally set a custom title for the duplicated task. Related data such as assigned users will also be duplicated.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/tasks/12/duplicate" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Copy of Design Review Task\",
    \"reload\": \"true\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/12/duplicate"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Copy of Design Review Task",
    "reload": "true"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Task duplicated successfully.",
    "id": 12,
    "parent_id": 5,
    "parent_type": "project"
}
 

Example response (400):


{
    "error": true,
    "message": "Task duplication failed."
}
 

Request      

POST api/master-panel/tasks/{id}/duplicate

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the task to duplicate. Example: 12

Body Parameters

title   string  optional  

optional A new title for the duplicated task. If not provided, the system will use a default naming convention. Example: Copy of Design Review Task

reload   string  optional  

optional Set to "true" if you want to trigger a session flash message (usually used for reloading UI). Example: true

Task status and performance

This endpoint allows you to update the status of a task by providing the task ID and the new status ID. It logs the status change in the task's status timeline and notifies assigned users and clients.

Update the status of a task.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/task/consequatur/status/3?isApi=1" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 33,
    \"statusId\": 4
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/task/consequatur/status/3"
);

const params = {
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 33,
    "statusId": 4
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": "33",
    "type": "task",
    "activity_message": "herry porter updated task status from Approved to Completed",
    "data": {
        "id": 33,
        "workspace_id": 2,
        "title": "Test Task Title",
        "status": "Completed",
        "status_id": 4,
        "priority": "low",
        "priority_id": 2,
        "users": [
            {
                "id": 2,
                "first_name": "herry",
                "last_name": "porter",
                "email": "admin@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            }
        ],
        "start_date": "2025-06-01",
        "due_date": "2025-06-10",
        "project": "favorite project",
        "project_id": 2,
        "description": "This is a test task description."
    }
}
 

Example response (403):


{
    "error": true,
    "message": "You are not authorized to set this status."
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\Task] 999"
}
 

Example response (500):


{
    "error": true,
    "message": "Task status couldn't updated."
}
 

Request      

POST api/master-panel/task/{id}/status/{newStatus}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the task. Example: consequatur

newStatus   integer   

Example: 3

Query Parameters

isApi   boolean  optional  

Optional. Set to true if calling from API to get a structured API response. Example: true

Body Parameters

id   integer   

The ID of the task to update. Example: 33

statusId   integer   

The new status ID to set on the task. Example: 4

Save User's Default Task View Preference

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/tasks/save-view-preference" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"view\": \"board\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/save-view-preference"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "view": "board"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Default View Set Successfully."
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "view": [
            "The view field is required."
        ]
    }
}
 

Request      

POST api/master-panel/tasks/save-view-preference

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

view   string   

The view preference to set. Example: board

Update Task Priority

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/tasks/update-priority" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 25,
    \"priorityId\": 1
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/update-priority"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 25,
    "priorityId": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priority updated successfully.",
    "id": 25,
    "type": "task",
    "activity_message": "herry porter updated task priority from low to high",
    "data": {
        "id": 25,
        "workspace_id": 2,
        "title": "Test Task Title",
        "status": "Approved",
        "status_id": 8,
        "priority": "high",
        "priority_id": 1,
        "users": [
            {
                "id": 2,
                "first_name": "herry",
                "last_name": "porter",
                "email": "admin@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            },
            {
                "id": 3,
                "first_name": "John",
                "last_name": "Doe",
                "email": "admin2@gmail.com",
                "photo": "http://localhost:8000/storage/photos/no-image.jpg"
            }
        ],
        "user_id": [
            2,
            3
        ],
        "clients": [],
        "start_date": "2025-06-01",
        "due_date": "2025-06-10",
        "project": "favorite project",
        "project_id": 2,
        "description": "This is a test task description.",
        "note": "Optional note about the task.",
        "favorite": 0,
        "client_can_discuss": null,
        "created_at": "2025-05-28",
        "updated_at": "2025-06-03",
        "enable_reminder": 1,
        "last_reminder_sent": null,
        "frequency_type": "weekly",
        "day_of_week": 3,
        "time_of_day": "14:30:00",
        "enable_recurring_task": 1,
        "recurrence_frequency": "monthly",
        "recurrence_day_of_month": 15,
        "recurrence_starts_from": "2025-06-01",
        "recurrence_occurrences": 6,
        "billing_type": "billable",
        "completion_percentage": 0,
        "task_list_id": null
    }
}
 

Example response (400):


{
    "error": true,
    "message": "No priority change detected."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "priorityId": [
            "The selected priorityId is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Priority couldn’t be updated."
}
 

Request      

POST api/master-panel/tasks/update-priority

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the task. If provided in the URL, it doesn't need to be in the body. Example: 25

Body Parameters

id   integer   

The ID of the task to update. Required if not provided in the URL. Example: 25

priorityId   integer  optional  

nullable The new priority ID. Use null or 0 to remove the priority. Example: 1

Task Media

Upload one or more media files to an existing task using its ID. The uploaded files will be stored in the task-media media collection using Spatie MediaLibrary. This endpoint accepts multiple files.

Upload media files to a task.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/tasks/upload-media" \
    --header "workspace_id: 2" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "id=25"\
    --form "media_files[]=@C:\Users\Rahul Soneji\AppData\Local\Temp\php2D4D.tmp" 
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/upload-media"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('id', '25');
body.append('media_files[]', document.querySelector('input[name="media_files[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200, Success):


{
    "error": false,
    "message": "File(s) uploaded successfully.",
    "id": [
        15,
        16
    ],
    "type": "media",
    "parent_type": "task",
    "parent_id": 25
}
 

Example response (200, No files uploaded):


{
    "error": true,
    "message": "No file(s) chosen."
}
 

Example response (422, Missing or invalid task ID):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "The selected id is invalid."
        ]
    }
}
 

Request      

POST api/master-panel/tasks/upload-media

Headers

workspace_id      

Example: 2

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

id   integer   

The ID of the task to which the files should be uploaded. Example: 25

media_files   file[]   

The media files to upload. Must be provided as an array of files.

Get task media list.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/tasks/25/media?search=image&sort=file_name&order=asc" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/25/media"
);

const params = {
    "search": "image",
    "sort": "file_name",
    "order": "asc",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "rows": [
        {
            "id": 16,
            "file": "<a href=\"http://localhost:8000/storage/task-media/hmgoepprod.jpg\" data-lightbox=\"task-media\"><img src=\"http://localhost:8000/storage/task-media/hmgoepprod.jpg\" alt=\"hmgoepprod.jpg\" width=\"50\"></a>",
            "file_name": "hmgoepprod.jpg",
            "file_size": "67.54 KB",
            "created_at": "2025-06-04",
            "updated_at": "2025-06-04",
            "actions": "<a href=\"http://localhost:8000/storage/task-media/hmgoepprod.jpg\" title=\"Download\" download><i class=\"bx bx-download bx-sm\"></i></a><button title=\"Delete\" type=\"button\" class=\"btn delete\" data-id=\"16\" data-type=\"task-media\" data-table=\"task_media_table\"><i class=\"bx bx-trash text-danger\"></i></button>"
        }
    ],
    "total": 2
}
 

Request      

GET api/master-panel/tasks/{id}/media

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the task to get media for. Example: 25

Query Parameters

search   string  optional  

Optional search term to filter by file name, ID, or creation date. Example: image

sort   string  optional  

Field to sort by. Default is id. Example: file_name

order   string  optional  

Sorting direction: asc or desc. Default is desc. Example: asc

Delete a media file from a task.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/tasks/media/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/tasks/media/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "File deleted successfully.",
    "id": 45,
    "title": "example-file.pdf",
    "parent_id": 23,
    "type": "media",
    "parent_type": "task"
}
 

Example response (404):


{
    "error": true,
    "message": "File not found."
}
 

Request      

DELETE api/master-panel/tasks/media/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the medium. Example: consequatur

mediaId   integer   

The ID of the media file to delete. Example: 45

Task Celender

Get calendar tasks data for a workspace.

Retrieves tasks for the specified workspace filtered by an optional date range and project ID. The tasks are formatted for use with FullCalendar.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/calendar/17?start=consequatur&end=consequatur&project_id=17" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/calendar/17"
);

const params = {
    "start": "consequatur",
    "end": "consequatur",
    "project_id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": 25,
        "tasks_info_url": "http://localhost:8000/master-panel/tasks/information/25",
        "title": "Test Task Title",
        "start": "2025-06-01",
        "end": "2025-06-10",
        "backgroundColor": "#a0e4a3",
        "borderColor": "#ffffff",
        "textColor": "#000000"
    },
    {
        "id": 28,
        "tasks_info_url": "http://localhost:8000/master-panel/tasks/information/28",
        "title": "Create new onboarding flow",
        "start": "2015-01-01",
        "end": "2025-06-06",
        "backgroundColor": "#a0e4a3",
        "borderColor": "#ffffff",
        "textColor": "#000000"
    }
]
 

Example response (404):


{
    "error": true,
    "message": "Workspace not found."
}
 

Example response (500):


{
    "error": true,
    "message": "Something went wrong: <error_message>"
}
 

Request      

GET api/master-panel/calendar/{workspaceId}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

workspaceId   integer   

The ID of the workspace to fetch tasks from. Example: 17

Query Parameters

start   string  optional  

optional Start date for filtering tasks (format: YYYY-MM-DD). Example: consequatur

end   string  optional  

optional End date for filtering tasks (format: YYYY-MM-DD). Example: consequatur

project_id   integer  optional  

optional Project ID to filter tasks by project. Example: 17

Task Comments

This endpoint allows an authenticated user to add a comment to a specific model such as a Task, Project, or any commentable entity. It also supports mentions (e.g., @username) and file attachments (e.g., PNG, PDF).

Add a comment to a model (e.g., task, project).

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/comments-create" \
    --header "workspace_id: 2" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "model_type=App\Models\Task"\
    --form "model_id=25"\
    --form "content=This is a test comment mentioning @john_doe"\
    --form "parent_id=5"\
    --form "attachments[]=@C:\Users\Rahul Soneji\AppData\Local\Temp\php2D8C.tmp" 
const url = new URL(
    "http://localhost:8000/api/master-panel/comments-create"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('model_type', 'App\Models\Task');
body.append('model_id', '25');
body.append('content', 'This is a test comment mentioning @john_doe');
body.append('parent_id', '5');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Comment Added Successfully",
    "comment": {
        "id": 20,
        "content": "This is a test comment mentioning @john_doe",
        "user": {
            "id": null,
            "name": null,
            "email": null
        },
        "attachments": [],
        "parent_id": null,
        "created_at": "2025-06-04 06:05:24",
        "created_human": "1 second ago"
    }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "model_type": [
            "The model_type field is required."
        ],
        "model_id": [
            "The model_id field is required."
        ],
        "content": [
            "The content field is required."
        ]
    }
}
 

Request      

POST api/master-panel/comments-create

Headers

workspace_id      

Example: 2

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

model_type   string   

The fully qualified model class name. Example: App\Models\Task

model_id   integer   

The ID of the model to comment on. Example: 25

content   string   

The comment content. Mentions like @username will be parsed. Example: This is a test comment mentioning @john_doe

parent_id   integer  optional  

nullable The ID of the parent comment (for replies). Example: 5

attachments   file[]  optional  

Must be a file. Must not be greater than 2048 kilobytes.

attachments[]   file  optional  

optional Optional file attachments (JPG, PNG, PDF, etc).

get comments

This endpoint allows an authenticated user to add a comment to any commentable model (e.g., Task, Project). Supports file attachments and user mentions within the comment content.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/comments/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "model_type=App\Models\Task"\
    --form "model_id=12"\
    --form "content=This is a test comment with @johndoe mentioned."\
    --form "parent_id=5"\
    --form "attachments[]=@C:\Users\Rahul Soneji\AppData\Local\Temp\php2D9D.tmp" 
const url = new URL(
    "http://localhost:8000/api/master-panel/comments/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('model_type', 'App\Models\Task');
body.append('model_id', '12');
body.append('content', 'This is a test comment with @johndoe mentioned.');
body.append('parent_id', '5');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "GET",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
  "success": true,
  "comment": {
    "id": 20,
    "commentable_type": "App\\Models\\Task",
    "commentable_id": 12,
    "content": "This is a test comment with <a href='/user/profile/5'>@johndoe</a>",
    "user_id": 3,
    "parent_id": null,
    "created_at": "2025-05-28T12:45:00.000000Z",
    "updated_at": "2025-05-28T12:45:00.000000Z",
    "attachments": [
      {
        "id": 1,
        "comment_id": 20,
        "file_name": "screenshot.png",
        "file_path": "comment_attachments/screenshot.png",
        "file_type": "image/png"
      }
    ]
  },
  "message": "Comment Added Successfully",
  "user": {
    "id": 3,
    "name": "John Doe",
    ...
  },
  "created_at": "just now"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "content": [
            "The content field is required."
        ]
    }
}
 

Request      

GET api/master-panel/comments/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the comment. Example: consequatur

Body Parameters

model_type   string   

The fully qualified class name of the model being commented on (e.g., App\Models\Task). Example: App\Models\Task

model_id   integer   

The ID of the model instance being commented on. Example: 12

content   string   

The content of the comment. Mentions (e.g., @username) will be converted to user links. Example: This is a test comment with @johndoe mentioned.

parent_id   integer  optional  

nullable The ID of the parent comment if this is a reply. Example: 5

attachments   file[]  optional  

Optional array of files to attach to the comment (jpg, jpeg, png, pdf, xlsx, txt, docx, max 2MB each).

Update a comment's content.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/comments/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment_id\": 15,
    \"content\": \"Updated comment mentioning @janedoe.\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/comments/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "comment_id": 15,
    "content": "Updated comment mentioning @janedoe."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Comment updated successfully.",
    "id": 15,
    "type": "project"
}
 

Example response (400):


{
    "error": true,
    "message": "Comment couldn't updated."
}
 

Request      

PUT api/master-panel/comments/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the comment. Example: consequatur

Body Parameters

comment_id   integer   

The ID of the comment to update. Example: 15

content   string   

The updated content of the comment. User mentions using @username will be parsed and linked. Example: Updated comment mentioning @janedoe.

Permanently delete a comment and its attachments.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/comments/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"comment_id\": 12
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/comments/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "comment_id": 12
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Comment deleted successfully.",
    "id": 12,
    "type": "project"
}
 

Example response (400):


{
    "error": true,
    "message": "Comment couldn't deleted."
}
 

Request      

DELETE api/master-panel/comments/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the comment. Example: consequatur

Body Parameters

comment_id   integer   

The ID of the comment to delete. Example: 12

Status Management

Get Status List or a Single Status

This endpoint allows you to:

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/status/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/status/3"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Fetch all statuses):


{
    "rows": [
        {
            "id": 1,
            "title": "Pending",
            "roles_has_access": "Admin, Manager",
            "color": "<span class=\"badge bg-warning\">Pending</span>",
            "created_at": "2024-08-20 10:12 AM",
            "updated_at": "2024-08-25 03:45 PM"
        },
        {
            "id": 2,
            "title": "Approved",
            "roles_has_access": "Admin",
            "color": "<span class=\"badge bg-success\">Approved</span>",
            "created_at": "2024-08-21 11:30 AM",
            "updated_at": "2024-08-26 02:15 PM"
        }
    ],
    "total": 2
}
 

Example response (200, Fetch single status by ID):


{
    "id": 3,
    "title": "Rejected",
    "roles_has_access": "User",
    "color": "<span class=\"badge bg-danger\">Rejected</span>",
    "created_at": "2024-08-22 09:00 AM",
    "updated_at": "2024-08-28 01:00 PM"
}
 

Example response (401, Unauthenticated request):


{
    "message": "Unauthenticated."
}
 

Example response (404, Status not found for given ID):


{
    "message": "Status not found."
}
 

Example response (500, Unexpected server error):


{
    "message": "Internal Server Error"
}
 

Request      

GET api/master-panel/status/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

Optional. The ID of the status you want to retrieve. Example: 3

Create a New Status

This endpoint creates a new status entry with a unique slug and assigns roles that have access to it.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/statuses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Approved\",
    \"color\": \"success\",
    \"role_ids\": [
        1,
        2
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/statuses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Approved",
    "color": "success",
    "role_ids": [
        1,
        2
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Successful creation):


{
    "error": false,
    "message": "Status created successfully.",
    "id": 5,
    "status": {
        "id": 5,
        "title": "Approved",
        "color": "success",
        "slug": "approved",
        "admin_id": 1,
        "created_at": "2025-05-28T12:34:56.000000Z",
        "updated_at": "2025-05-28T12:34:56.000000Z"
    }
}
 

Example response (422, Validation failed):


{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color field is required."
        ]
    }
}
 

Example response (500, Creation failed due to internal error):


{
    "error": true,
    "message": "Status couldn't created."
}
 

Request      

POST api/master-panel/statuses

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The name of the status. Example: Approved

color   string   

The Bootstrap color class (without bg- prefix). Example: success

role_ids   string[]  optional  

Optional list of role IDs to associate with the status.

Update an Existing Status

This endpoint updates the title, color, and associated roles of an existing status.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/statuses/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 5,
    \"title\": \"Rejected\",
    \"color\": \"danger\",
    \"role_ids\": [
        1,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/statuses/3"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 5,
    "title": "Rejected",
    "color": "danger",
    "role_ids": [
        1,
        3
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Successful update):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": 5
}
 

Example response (404, Status not found):


{
    "message": "No query results for model [App\\Models\\Status] 99"
}
 

Example response (422, Validation failed):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color field is required."
        ]
    }
}
 

Example response (500, Update failed due to internal error):


{
    "error": true,
    "message": "Status couldn't updated."
}
 

Request      

PUT api/master-panel/statuses/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the status. Example: 3

Body Parameters

id   integer   

The ID of the status to update. Example: 5

title   string   

The updated title of the status. Example: Rejected

color   string   

The updated color class (without bg- prefix). Example: danger

role_ids   string[]  optional  

Optional array of role IDs to sync with the status.

Delete a Status

This endpoint deletes a status if it is not associated with any project or task.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/statuses/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/statuses/5"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200, Successful deletion):


{
    "error": false,
    "message": "Status deleted successfully."
}
 

Example response (403, Status associated with project or task):


{
    "error": true,
    "message": "Status can't be deleted.It is associated with a project or task."
}
 

Example response (404, Status not found):


{
    "message": "No query results for model [App\\Models\\Status] 99"
}
 

Example response (500, Deletion failed due to server error):


{
    "error": true,
    "message": "Something went wrong while deleting the status."
}
 

Request      

DELETE api/master-panel/statuses/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the status to delete. Example: 5

Delete Multiple Statuses

Deletes multiple statuses by their IDs if they are not associated with any project or task.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/destroy-multiple-statuses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/destroy-multiple-statuses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Successful deletion):


{
    "error": false,
    "message": "Status(es) deleted successfully.",
    "id": [
        1,
        2
    ],
    "titles": [
        "Approved",
        "Pending"
    ]
}
 

Example response (403, Status associated with project or task):


{
    "error": true,
    "message": "Status can't be deleted.It is associated with a project"
}
 

Example response (404, Status not found):


{
    "message": "No query results for model [App\\Models\\Status] 99"
}
 

Example response (422, Validation failed):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids": [
            "The ids field is required."
        ],
        "ids.0": [
            "The selected ids.0 is invalid."
        ]
    }
}
 

Example response (500, Deletion failed due to server error):


{
    "error": true,
    "message": "Something went wrong while deleting the statuses."
}
 

Request      

DELETE api/master-panel/destroy-multiple-statuses

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

Array of status IDs to delete. Each ID must exist in the statuses table.

*   integer   

Individual status ID. Example: 1

Client Management

This endpoint deletes a specific client by their ID. It removes the client from the database along with all their associated todos, and uses a reusable deletion service for standardized deletion handling.

List or Retrieve Clients This endpoint is used to retrieve a list of all clients for the current workspace, or a single client if an ID is provided. It supports searching, sorting, and pagination. Requires a `workspace_id` header to identify the current workspace context.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/clients/17?isApi=1&search=john&sort=first_name&order=ASC&limit=15" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/clients/17"
);

const params = {
    "isApi": "1",
    "search": "john",
    "sort": "first_name",
    "order": "ASC",
    "limit": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
  "success": false,
  "message": "Clients retrieved successfully",
  "data": {
    "total": 2,
    "data": [
      {
        "id": 1,
        "first_name": "John",
        "last_name": "Doe",
        "email": "john@example.com",
        "company": "Acme Inc",
        ...
      }
    ],
    "pagination": {
      "current_page": 1,
      "last_page": 1,
      "per_page": 10,
      "total": 2
    }
  }
}
 

Example response (400):


{
    "error": "Workspace ID header missing"
}
 

Example response (404):


{
    "error": "Client not found"
}
 

Example response (500):


{
    "success": true,
    "message": "Client couldn't be retrieved.",
    "data": {
        "error": "Detailed error message",
        "line": 123,
        "file": "path/to/file.php"
    }
}
 

Request      

GET api/master-panel/clients/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

Optional. The ID of the client to retrieve. If not provided, a paginated list of clients will be returned. Example: 17

Query Parameters

isApi   boolean  optional  

Optional. Indicates if the request is from an API context. Default: false. Example: true

search   string  optional  

Optional. Search clients by first name, last name, company, email, or phone. Example: john

sort   string  optional  

Optional. Field to sort by. Default: id. Example: first_name

order   string  optional  

Optional. Sort direction: ASC or DESC. Default: DESC. Example: ASC

limit   integer  optional  

Optional. Number of clients per page. Default: 10. Example: 15

Create a new client.

This endpoint is used to create a new client, either for internal purposes or for general usage. The client can be created with optional email verification and notification settings. The request must include a workspace-id in the headers to identify which workspace the client belongs to.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/clients" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"company\": \"Acme Corp\",
    \"email\": \"john@example.com\",
    \"phone\": \"1234567890\",
    \"country_code\": \"+1\",
    \"password\": \"password123\",
    \"password_confirmation\": \"password123\",
    \"address\": \"123 Main St\",
    \"city\": \"New York\",
    \"state\": \"NY\",
    \"country\": \"USA\",
    \"zip\": \"10001\",
    \"dob\": \"1990-01-01\",
    \"doj\": \"2023-01-01\",
    \"country_iso_code\": \"US\",
    \"internal_purpose\": true,
    \"require_ev\": false,
    \"status\": true,
    \"example\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/clients"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "company": "Acme Corp",
    "email": "john@example.com",
    "phone": "1234567890",
    "country_code": "+1",
    "password": "password123",
    "password_confirmation": "password123",
    "address": "123 Main St",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "zip": "10001",
    "dob": "1990-01-01",
    "doj": "2023-01-01",
    "country_iso_code": "US",
    "internal_purpose": true,
    "require_ev": false,
    "status": true,
    "example": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Client created successfully.",
  "data": {
    "id": 23,
    "first_name": "John",
    "last_name": "Doe",
    ...
  }
}
 

Example response (400):


{
    "error": true,
    "message": "Invalid or missing workspace.",
    "workspace_id": null
}
 

Example response (422):


{
    "error": true,
    "message": "The email has already been taken in users or clients.",
    "errors": {
        "email": [
            "The email has already been taken in users or clients."
        ]
    }
}
 

Example response (500):


{
    "error": "Exception message here",
    "message": "Client could not be created.",
    "line": 120,
    "file": "ClientController.php"
}
 

Request      

POST api/master-panel/clients

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

first_name   string   

The first name of the client. Example: John

last_name   string   

The last name of the client. Example: Doe

company   string  optional  

The company name of the client. Example: Acme Corp

email   string   

The email address of the client. Must be unique. Example: john@example.com

phone   string  optional  

The phone number of the client. Example: 1234567890

country_code   string  optional  

The phone country code. Example: +1

password   string  optional  

required_if:internal_purpose,off The password for the client (min 6 characters). Required unless internal_purpose is on. Example: password123

password_confirmation   string  optional  

Same as password. Required if password is present. Example: password123

address   string  optional  

The address of the client. Example: 123 Main St

city   string  optional  

The city of the client. Example: New York

state   string  optional  

The state of the client. Example: NY

country   string  optional  

The country of the client. Example: USA

zip   string  optional  

The ZIP/postal code. Example: 10001

dob   string  optional  

The date of birth in the configured date format. Example: 1990-01-01

doj   string  optional  

The date of joining in the configured date format. Example: 2023-01-01

country_iso_code   string  optional  

ISO country code. Example: US

internal_purpose   boolean  optional  

Whether the client is for internal purpose only. Example: true

require_ev   boolean  optional  

Should email verification be required. Only applicable if user has permission. Example: false

status   boolean  optional  

Should the client be activated immediately. Only applicable if user has permission. Example: true

example   {  optional  

"first_name": "John", "last_name": "Doe", "company": "Acme Corp", "email": "john@example.com", "phone": "1234567890", "country_code": "+1", "password": "password123", "password_confirmation": "password123", "address": "123 Main St", "city": "New York", "state": "NY", "country": "USA", "zip": "10001", "dob": "1990-01-01", "doj": "2023-01-01", "country_iso_code": "US", "internal_purpose": "on", "require_ev": 0, "status": 1 } Example: consequatur

Update a client

This endpoint updates the details of an existing client, including profile information, status, internal usage flag, password, and triggers account creation or email verification emails if needed.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/clients/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"company\": \"Acme Corp\",
    \"email\": \"john.doe@example.com\",
    \"phone\": \"+1234567890\",
    \"country_code\": \"+91\",
    \"address\": \"123 Main St\",
    \"city\": \"Mumbai\",
    \"state\": \"Maharashtra\",
    \"country\": \"India\",
    \"zip\": \"400001\",
    \"dob\": \"1990-05-01\",
    \"doj\": \"2023-04-15\",
    \"country_iso_code\": \"IN\",
    \"status\": 1,
    \"require_ev\": 1
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/clients/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "company": "Acme Corp",
    "email": "john.doe@example.com",
    "phone": "+1234567890",
    "country_code": "+91",
    "address": "123 Main St",
    "city": "Mumbai",
    "state": "Maharashtra",
    "country": "India",
    "zip": "400001",
    "dob": "1990-05-01",
    "doj": "2023-04-15",
    "country_iso_code": "IN",
    "status": 1,
    "require_ev": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Client details updated successfully.",
  "data": {
    "id": 5,
    "first_name": "John",
    "last_name": "Doe",
    ...
  }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

PUT api/master-panel/clients/{client}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

client   string   

The client. Example: consequatur

id   integer   

The ID of the client to update. Example: 5

Body Parameters

first_name   string   

The client's first name. Example: John

last_name   string   

The client's last name. Example: Doe

company   string  optional  

The client's company name. Example: Acme Corp

email   string   

Must be a valid and unique email address. Example: john.doe@example.com

phone   string  optional  

The client's phone number. Example: +1234567890

country_code   string  optional  

The country code for the phone number. Example: +91

address   string  optional  

The client's address. Example: 123 Main St

city   string  optional  

The client's city. Example: Mumbai

state   string  optional  

The client's state. Example: Maharashtra

country   string  optional  

The client's country. Example: India

zip   string  optional  

The client's postal code. Example: 400001

dob   date  optional  

The client's date of birth (YYYY-MM-DD). Example: 1990-05-01

doj   date  optional  

The client's date of joining (YYYY-MM-DD). Example: 2023-04-15

country_iso_code   string  optional  

The ISO code of the client's country. Example: IN

status   integer  optional  

The client's status (1 = active, 0 = inactive). Example: 1

require_ev   integer  optional  

Set to 1 to send email verification, 0 to skip. Example: 1

Delete a client.

requires authentication

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/clients/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/clients/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Client deleted successfully.",
    "id": 28,
    "title": "hrdeep Raa",
    "data": []
}
 

Example response (404):


{
    "error": "No query results for model [App\\Models\\Client] 15",
    "message": "Client not found."
}
 

Example response (500):


{
    "error": "Exception message",
    "message": "Client could not be deleted.",
    "line": 123,
    "file": "path/to/file"
}
 

Request      

DELETE api/master-panel/clients/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the client. Example: consequatur

client   integer   

The ID of the client to delete. Example: 15

Delete multiple clients.

Deletes multiple clients by their IDs along with their associated todos.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/destroy-multiple-clients" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/destroy-multiple-clients"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Clients(s) deleted successfully.",
    "id": [
        1,
        2,
        3
    ],
    "titles": [
        "John Doe",
        "Jane Smith",
        "Alice Johnson"
    ]
}
 

Example response (404):


{
    "error": true,
    "message": "Client not found."
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "ids": [
            "The ids field is required."
        ],
        "ids.0": [
            "The selected ids.0 is invalid."
        ]
    }
}
 

Request      

DELETE api/master-panel/destroy-multiple-clients

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

An array of client IDs to delete.

*   integer   

Each client ID must exist in the clients table. Example: 17

Priority

Create a new priority

This endpoint allows you to create a new priority with a title and color. It automatically generates a unique slug and assigns the current admin as the creator.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/priorities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"High Priority\",
    \"color\": \"#FF0000\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/priorities"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "High Priority",
    "color": "#FF0000"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priority created successfully.",
    "data": {
        "id": 7,
        "title": "High Priority",
        "slug": "high-priority",
        "color": "#FF0000",
        "admin_id": 1,
        "created_at": "2025-06-04T14:25:30.000000Z",
        "updated_at": "2025-06-04T14:25:30.000000Z"
    },
    "id": 7
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color field is required."
        ]
    }
}
 

Example response (500):


{
    "error": "Exception message here",
    "message": "Priority could not be created.",
    "line": 45,
    "file": "PriorityController.php"
}
 

Request      

POST api/master-panel/priorities

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the priority. Example: High Priority

color   string   

The color associated with the priority (hex code or color name). Example: #FF0000

Update an existing priority.

This endpoint updates the title, color, and slug of an existing priority record. The priority is identified by its ID.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/priorities/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 10,
    \"title\": \"High\",
    \"color\": \"#FF0000\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/priorities/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 10,
    "title": "High",
    "color": "#FF0000"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priority updated successfully.",
    "data": {
        "id": 10,
        "title": "High",
        "color": "#FF0000",
        "slug": "high"
    },
    "id": 10
}
 

Example response (404):


{
    "error": true,
    "message": "Priority not found."
}
 

Example response (422):


{
    "error": true,
    "message": "Validation error.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Priority could not be updated due to server error."
}
 

Request      

PUT api/master-panel/priorities/{priority}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

priority   string   

The priority. Example: consequatur

Body Parameters

id   integer   

The ID of the priority to update. Example: 10

title   string   

The new title of the priority. Example: High

color   string   

The new color code for the priority. Example: #FF0000

Delete a priority.

This endpoint deletes a specific priority by its ID. Before deletion, it detaches the priority from all related projects and tasks.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/priorities/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/priorities/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priority deleted successfully.",
    "id": 5,
    "title": "High Priority"
}
 

Example response (404):


{
    "error": "No query results for model [App\\Models\\Priority] 999",
    "message": "Priority not found."
}
 

Example response (500):


{
    "error": "Exception message here",
    "message": "Priority could not be deleted.",
    "line": 42,
    "file": "PriorityController.php"
}
 

Request      

DELETE api/master-panel/priorities/{priority}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

priority   string   

The priority. Example: consequatur

id   integer   

The ID of the priority to delete. Example: 5

Get priorities list or a specific priority.

This endpoint allows fetching either a paginated list of priorities or a single priority by providing its ID. It supports optional searching, sorting, and pagination when listing all priorities.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/priorities/3?search=Urgent&sort=title&order=ASC&limit=10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/priorities/3"
);

const params = {
    "search": "Urgent",
    "sort": "title",
    "order": "ASC",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priorities fetched successfully.",
    "data": {
        "rows": [
            {
                "id": 1,
                "title": "High",
                "color": "red",
                "created_at": "2024-06-01",
                "updated_at": "2024-06-01"
            }
        ],
        "total": 1,
        "current_page": 1,
        "last_page": 1
    }
}
 

Example response (200):


{
    "error": false,
    "message": "Priority fetched successfully.",
    "data": {
        "id": 1,
        "title": "High",
        "color": "red",
        "created_at": "2024-06-01",
        "updated_at": "2024-06-01"
    }
}
 

Example response (404):


{
    "error": "No query results for model [App\\Models\\Priority] 3",
    "message": "Priority not found."
}
 

Example response (500):


{
    "error": "Exception message here",
    "message": "Failed to fetch priorities.",
    "line": 101,
    "file": "PriorityController.php"
}
 

Request      

GET api/master-panel/priorities/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the priority to retrieve. Example: 3

Query Parameters

search   string  optional  

optional Search term for filtering by title or ID. Example: Urgent

sort   string  optional  

optional Field to sort by. Defaults to id. Example: title

order   string  optional  

optional Sort order. Either ASC or DESC. Defaults to DESC. Example: ASC

limit   integer  optional  

optional Number of records per page. Defaults to 15. Example: 10

Delete multiple priorities.

This endpoint deletes one or more priorities based on the provided array of IDs. It also detaches the priorities from any associated projects and tasks before deletion. Each priority must exist in the database.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/multiple-delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/multiple-delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Priority/Priorities deleted successfully.",
    "ids": [
        1,
        2,
        3
    ],
    "titles": [
        "High",
        "Medium",
        "Low"
    ]
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "ids.0": [
            "The selected ids.0 is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": "Exception message",
    "message": "Priorities could not be deleted.",
    "line": 123,
    "file": "PriorityController.php"
}
 

Request      

DELETE api/master-panel/multiple-delete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

The list of priority IDs to delete.

*   integer   

Each ID must correspond to an existing priority. Example: 1

User Managemant

This endpoint allows admins to create a new user within a workspace. Email uniqueness is checked across both users and clients. Optionally, a verification email and account creation email are sent based on system configuration.

Create a new user

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/user" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john.smith@example.com\",
    \"password\": \"secret123\",
    \"password_confirmation\": \"secret123\",
    \"address\": \"123 Main St\",
    \"phone\": \"+1234567890\",
    \"country_code\": \"+91\",
    \"city\": \"Mumbai\",
    \"state\": \"Maharashtra\",
    \"country\": \"India\",
    \"zip\": \"400001\",
    \"dob\": \"1990-01-01\",
    \"doj\": \"2022-01-01\",
    \"role\": \"admin\",
    \"country_iso_code\": \"IN\",
    \"require_ev\": true,
    \"status\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/user"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.smith@example.com",
    "password": "secret123",
    "password_confirmation": "secret123",
    "address": "123 Main St",
    "phone": "+1234567890",
    "country_code": "+91",
    "city": "Mumbai",
    "state": "Maharashtra",
    "country": "India",
    "zip": "400001",
    "dob": "1990-01-01",
    "doj": "2022-01-01",
    "role": "admin",
    "country_iso_code": "IN",
    "require_ev": true,
    "status": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "User created successfully.",
    "id": 54,
    "data": {
        "id": 54,
        "first_name": "John",
        "last_name": "Doe",
        "full_name": "John Doe",
        "email": "john.smith@example.com",
        "phone": "+1234567890",
        "address": "123 Main St",
        "country_code": "+91",
        "city": "Mumbai",
        "state": "Maharashtra",
        "country": "India",
        "zip": "400001",
        "dob": null,
        "doj": null,
        "role": "admin",
        "status": 1,
        "email_verified": false,
        "photo_url": "http://localhost:8000/storage/photos/no-image.jpg",
        "created_at": "2025-06-11 06:48:45",
        "updated_at": "2025-06-11 06:48:45",
        "require_ev": 1
    }
}
 

Example response (422):


{
    "errors": {
        "email": [
            "The email has already been taken in users or clients."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "User couldn't be created, please make sure email settings are operational."
}
 

Request      

POST api/master-panel/user

Headers

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

first_name   string   

The user's first name. Example: John

last_name   string   

The user's last name. Example: Doe

email   string   

The user's unique email address. Must not exist in users or clients. Example: john.smith@example.com

password   string   

The password (minimum 6 characters). Example: secret123

password_confirmation   string   

Must match the password. Example: secret123

address   string  optional  

The user's address. Example: 123 Main St

phone   string  optional  

The user's phone number. Example: +1234567890

country_code   string  optional  

Country dialing code. Example: +91

city   string  optional  

The city. Example: Mumbai

state   string  optional  

The state. Example: Maharashtra

country   string  optional  

The country. Example: India

zip   string  optional  

The zip/postal code. Example: 400001

dob   date  optional  

The user's date of birth (in 'Y-m-d' format). Example: 1990-01-01

doj   date  optional  

The user's date of joining (in 'Y-m-d' format). Example: 2022-01-01

role   string   

The role to assign to the user. Example: admin

country_iso_code   string  optional  

Optional country ISO code. Example: IN

require_ev   boolean  optional  

Whether email verification is required. 1 = yes, 0 = no. Example: true

status   boolean  optional  

Whether the user account should be active immediately. Example: true

Update user details.

requires authentication

This endpoint allows updating user profile information. The request must be sent in raw JSON format.

📎 Required Headers:

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/user/18" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"phone\": \"+1234567890\",
    \"country_code\": \"US\",
    \"address\": \"123 Main St\",
    \"city\": \"New York\",
    \"state\": \"NY\",
    \"country\": \"USA\",
    \"zip\": \"10001\",
    \"dob\": \"1990-01-01\",
    \"doj\": \"2020-01-01\",
    \"password\": \"newsecret\",
    \"password_confirmation\": \"newsecret\",
    \"country_iso_code\": \"US\",
    \"status\": true,
    \"role\": \"admin\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/user/18"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "phone": "+1234567890",
    "country_code": "US",
    "address": "123 Main St",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "zip": "10001",
    "dob": "1990-01-01",
    "doj": "2020-01-01",
    "password": "newsecret",
    "password_confirmation": "newsecret",
    "country_iso_code": "US",
    "status": true,
    "role": "admin"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "User updated successfully.",
    "id": 18,
    "data": {
        "id": 18,
        "first_name": "John",
        "last_name": "Doe",
        "full_name": "John Doe",
        "email": "john.doe27@example.com",
        "phone": "+1234567890",
        "address": "123 Main St",
        "country_code": "US",
        "city": "New York",
        "state": "NY",
        "country": "USA",
        "zip": "10001",
        "dob": null,
        "doj": null,
        "role": "admin",
        "status": true,
        "email_verified": true,
        "photo_url": "http://localhost:8000/storage/photos/no-image.jpg",
        "created_at": "2025-06-10 10:00:16",
        "updated_at": "2025-06-11 06:41:43"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "first_name": [
            "The first name field is required."
        ],
        "password": [
            "The password must be at least 6 characters."
        ]
    }
}
 

Request      

PUT api/master-panel/user/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user to update. Example: 18

Body Parameters

first_name   string   

The user's first name. Example: John

last_name   string   

The user's last name. Example: Doe

phone   string  optional  

nullable The user's phone number. Example: +1234567890

country_code   string  optional  

nullable Country calling code. Example: US

address   string  optional  

nullable Street address. Example: 123 Main St

city   string  optional  

nullable City name. Example: New York

state   string  optional  

nullable State name. Example: NY

country   string  optional  

nullable Country name. Example: USA

zip   string  optional  

nullable Zip or postal code. Example: 10001

dob   date  optional  

nullable Date of birth (Y-m-d). Example: 1990-01-01

doj   date  optional  

nullable Date of joining (Y-m-d). Example: 2020-01-01

password   string  optional  

nullable Minimum 6 characters to change password. Example: newsecret

password_confirmation   string  optional  

required_with:password Must match the password. Example: newsecret

country_iso_code   string  optional  

nullable ISO country code. Example: US

status   boolean  optional  

nullable Whether the user is active. Example: true

role   string  optional  

nullable Role to assign (not for admins). Example: admin

Delete a user

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/user/6" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/user/6"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "User deleted successfully.",
    "id": "6",
    "title": "John Doe",
    "data": []
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\User] 999"
}
 

Example response (500):


{
    "error": true,
    "message": "Failed to delete User due to internal server error."
}
 

Request      

DELETE api/master-panel/user/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user to delete. Example: 6

Get users list or specific user

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/user/5?search=John&sort=first_name&order=ASC&status=1&role_ids[]=1&role_ids[]=2&type=project&typeId=3&limit=10&isApi=1" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/user/5"
);

const params = {
    "search": "John",
    "sort": "first_name",
    "order": "ASC",
    "status": "1",
    "role_ids[0]": "1",
    "role_ids[1]": "2",
    "type": "project",
    "typeId": "3",
    "limit": "10",
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Users retrieved successfully",
    "total": 2,
    "data": [
        {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com",
            "phone": "+91 9876543210",
            "status": 1,
            "created_at": "2024-01-01 10:00:00",
            "updated_at": "2024-06-01 09:00:00",
            "role": "Admin",
            "profile": "...",
            "assigned": "...",
            "actions": "..."
        }
    ]
}
 

Example response (200):


{
  "error": false,
  "message": "User retrieved successfully",
  "data": {
    "id": 5,
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane@example.com",
    "phone": "+91 1234567890",
    "status": 1,
    ...
  }
}
 

Example response (404):


{
    "error": true,
    "message": "User not found",
    "data": []
}
 

Example response (500):


{
    "error": "Exception message",
    "message": "Failed to retrieve users"
}
 

Request      

GET api/master-panel/user/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the user to retrieve. Leave blank to get all users. Example: 5

Query Parameters

search   string  optional  

optional Filter users by name, email, or phone. Example: John

sort   string  optional  

optional Field to sort by. Default is id. Example: first_name

order   string  optional  

optional Sort order: ASC or DESC. Default is DESC. Example: ASC

status   integer  optional  

optional Filter users by status (1 for active, 0 for inactive). Example: 1

role_ids   string[]  optional  

optional Filter users by one or more role IDs.

type   string  optional  

optional Source of user relation (project or task). Example: project

typeId   integer  optional  

optional ID of the related project or task. Required if type is provided. Example: 3

limit   integer  optional  

optional Number of results per page. Example: 10

isApi   boolean  optional  

optional Indicates API context (used internally). Default: true. Example: true

Workspace Managemant

This endpoint allows authenticated users to create a new workspace. It automatically associates users and clients, sets the workspace as primary (if requested), and logs activity. Notifications are sent to the participants.

Create a new workspace

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/workspace" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Design Team\",
    \"user_ids\": [
        3,
        5
    ],
    \"client_ids\": [
        101,
        102
    ],
    \"primaryWorkspace\": true,
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/workspace"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "title": "Design Team",
    "user_ids": [
        3,
        5
    ],
    "client_ids": [
        101,
        102
    ],
    "primaryWorkspace": true,
    "isApi": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Workspace created successfully.",
    "id": 438,
    "data": {
        "id": 438,
        "title": "Design Team",
        "is_primary": true,
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://yourdomain.com/storage/photos/user.png"
            }
        ],
        "clients": [
            {
                "id": 103,
                "first_name": "Test",
                "last_name": "Test",
                "photo": "https://yourdomain.com/storage/photos/no-image.jpg"
            }
        ],
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 14:38:51"
    }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Request      

POST api/master-panel/workspace

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

Body Parameters

title   string   

The name of the workspace. Example: Design Team

user_ids   string[]  optional  

List of user IDs to attach to the workspace.

client_ids   string[]  optional  

List of client IDs to attach to the workspace.

primaryWorkspace   boolean  optional  

Indicates if this workspace should be set as the primary workspace. Example: true

isApi   boolean  optional  

Optional flag to return API-formatted response. Example: true

Update an existing workspace

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/workspace/consequatur" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 12,
    \"title\": \"Design Team\",
    \"user_ids\": [
        1,
        3
    ],
    \"client_ids\": [
        101,
        104
    ],
    \"primaryWorkspace\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/workspace/consequatur"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

let body = {
    "id": 12,
    "title": "Design Team",
    "user_ids": [
        1,
        3
    ],
    "client_ids": [
        101,
        104
    ],
    "primaryWorkspace": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "id": 12,
    "message": "Workspace updated successfully.",
    "data": {
        "id": 12,
        "title": "Design Team",
        "is_primary": true,
        "users": [
            {
                "id": 3,
                "first_name": "Alice",
                "last_name": "Doe",
                "photo": "https://example.com/photos/user3.jpg"
            }
        ],
        "clients": [
            {
                "id": 101,
                "first_name": "Bob",
                "last_name": "Client",
                "photo": "https://example.com/photos/client101.jpg"
            }
        ],
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 15:10:02"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation failed.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "id": [
            "The selected id is invalid."
        ]
    }
}
 

Request      

PUT api/master-panel/workspace/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   string   

The ID of the workspace. Example: consequatur

Body Parameters

id   integer   

The ID of the workspace. Example: 12

title   string   

The updated title of the workspace. Example: Design Team

user_ids   string[]  optional  

optional List of user IDs to associate with the workspace.

client_ids   string[]  optional  

optional List of client IDs to associate with the workspace.

primaryWorkspace   boolean  optional  

optional Whether this workspace is set as the primary one. Example: true

Delete a workspace

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/workspace/12" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/workspace/12"
);

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Workspace deleted successfully.",
    "id": "3",
    "title": "Design Team Workspace",
    "data": []
}
 

Example response (400):


{
    "error": true,
    "message": "Cannot delete the currently active workspace."
}
 

Example response (404):


{
    "error": true,
    "message": "Workspace not found or already deleted."
}
 

Request      

DELETE api/master-panel/workspace/{id}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the workspace. Example: 12

Get a list of workspaces or a specific workspace.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/workspace/17?search=first&sort=title&order=ASC&limit=20&isApi=" \
    --header "Authorization: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1" \
    --header "Accept: application/json" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/workspace/17"
);

const params = {
    "search": "first",
    "sort": "title",
    "order": "ASC",
    "limit": "20",
    "isApi": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1",
    "Accept": "application/json",
    "workspace_id": "2",
    "Content-Type": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Workspaces retrieved successfully.",
    "total": 2,
    "data": [
        {
            "id": 1,
            "title": "Marketing Team",
            "is_primary": true,
            "users": [
                {
                    "id": 2,
                    "first_name": "Jane",
                    "last_name": "Doe",
                    "photo": "http://localhost:8000/storage/photos/no-image.jpg"
                }
            ],
            "clients": [
                {
                    "id": 5,
                    "first_name": "Client",
                    "last_name": "One",
                    "photo": "http://localhost:8000/storage/photos/no-image.jpg"
                }
            ],
            "created_at": "2025-05-19 09:53:37",
            "updated_at": "2025-06-05 11:35:18"
        }
    ]
}
 

Example response (200):


{
 "error": false,
 "message": "Workspace retrieved successfully.",
 "data": {
     "id": 2,
     "title": "Design Department",
     "is_primary": false,
     "users": [...],
     "clients": [...],
     "created_at": "2025-05-19 09:53:37",
     "updated_at": "2025-06-05 11:35:18"
 }
}
 

Example response (404):


{
    "error": true,
    "message": "No query results for model [App\\Models\\Workspace] 999.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "Internal Server Error",
    "data": []
}
 

Request      

GET api/master-panel/workspace/{id?}

Headers

Authorization      

Example: Bearer 40|dbscqcapUOVnO7g5bKWLIJ2H2zBM0CBUH218XxaNf548c4f1

Accept      

Example: application/json

workspace_id      

Example: 2

Content-Type      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the workspace to retrieve. Example: 17

Query Parameters

search   string  optional  

optional Search by workspace title or ID. Example: first

sort   string  optional  

optional Column to sort by. Default is "id". Example: title

order   string  optional  

optional Sort direction ("ASC" or "DESC"). Default is "DESC". Example: ASC

limit   integer  optional  

optional Number of results per page. Default is 10. Example: 20

isApi   boolean  optional  

optional Set true if called from API. Default is true. Example: false

Todos Managemant

Updates a specific Todo item based on the provided ID and new data. Requires the id, title, and priority fields in the request.

Create a new Todo item.

requires authentication

This endpoint creates a new todo item associated with the current workspace and admin.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/todo" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"\\\"Finish report\\\"\",
    \"priority\": \"\\\"High\\\"\",
    \"description\": \"\\\"Complete the monthly sales report.\\\"\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/todo"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "\"Finish report\"",
    "priority": "\"High\"",
    "description": "\"Complete the monthly sales report.\""
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Todo created successfully.",
    "data": {
        "id": 1,
        "title": "Finish report",
        "priority": "High",
        "description": "Complete the monthly sales report.",
        "workspace_id": 5,
        "admin_id": 3,
        "created_at": "2025-06-05 10:00:00",
        "updated_at": "2025-06-05 10:00:00"
    }
}
 

Example response (404):


{
    "error": true,
    "message": "Workspace not found in session.",
    "data": []
}
 

Example response (422):


{
    "error": true,
    "message": "Validation error.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "priority": [
            "The priority field is required."
        ]
    }
}
 

Example response (500):


{
    "error": "SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row",
    "message": "Lead Couldn't Created.",
    "line": 45,
    "file": "/var/www/html/app/Http/Controllers/TodoController.php"
}
 

Request      

POST api/master-panel/todo

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the todo item. Example: "Finish report"

priority   string   

The priority level of the todo. Example: "High"

description   string  optional  

nullable Optional detailed description of the todo. Example: "Complete the monthly sales report."

Update an existing Todo

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/todo/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 5,
    \"title\": \"Complete Report\",
    \"priority\": \"High\",
    \"description\": \"Submit final version to manager\",
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/todo/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 5,
    "title": "Complete Report",
    "priority": "High",
    "description": "Submit final version to manager",
    "isApi": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Todo updated successfully.",
    "data": {
        "id": 5,
        "data": {
            "id": 5,
            "title": "Complete Report",
            "priority": "High",
            "description": "Submit final version to manager",
            "workspace_id": 2,
            "admin_id": 1,
            "created_at": "2025-06-05 14:45:23",
            "updated_at": "2025-06-06 10:12:45"
        }
    }
}
 

Example response (404):


{
    "error": true,
    "message": "No query results for model [App\\Models\\Todo] 999."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "priority": [
            "The priority field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Todo couldn't be updated.",
    "data": {
        "error": "Error message details...",
        "line": 45,
        "file": "/app/Http/Controllers/TodoController.php"
    }
}
 

Request      

PUT api/master-panel/todo/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the todo. Example: consequatur

Body Parameters

id   integer   

The ID of the Todo to update. Example: 5

title   string   

The updated title for the Todo. Example: Complete Report

priority   string   

The updated priority level. Example: High

description   string  optional  

The updated description for the Todo (optional). Example: Submit final version to manager

isApi   boolean  optional  

Whether the request is from API. Example: true

Delete a Todo

Deletes a specific todo item by ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/todo/42" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/todo/42"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Todo deleted successfully.",
    "data": {
        "id": 42,
        "title": "Call client",
        "priority": "High",
        "description": "Discuss contract terms",
        "created_at": "2025-06-05T12:00:00Z",
        "updated_at": "2025-06-05T14:00:00Z"
    }
}
 

Example response (404):


{
    "error": true,
    "message": "Todo not found.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting Todo.",
    "data": {
        "error": "SQLSTATE[23000]: Integrity constraint violation: ...",
        "line": 88,
        "file": "/app/Http/Controllers/TodoController.php"
    }
}
 

Request      

DELETE api/master-panel/todo/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the todo to delete. Example: 42

Display a listing of todos or a specific todo by ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/todo/consequatur?isApi=&id=17&search=consequatur&sort=consequatur&order=consequatur&limit=17" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/todo/consequatur"
);

const params = {
    "isApi": "0",
    "id": "17",
    "search": "consequatur",
    "sort": "consequatur",
    "order": "consequatur",
    "limit": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Todos retrieved successfully.",
    "total": 25,
    "data": [
        {
            "id": 1,
            "title": "Sample Todo",
            "description": "Description here",
            "priority": "High",
            "is_completed": false,
            "creator": {
                "id": 2,
                "first_name": "John",
                "last_name": "Doe"
            },
            "created_at": "2025-06-05 10:00:00",
            "updated_at": "2025-06-05 10:30:00"
        }
    ]
}
 

Example response (404):


{
    "error": true,
    "message": "Todo not found.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "Internal Server Error",
    "data": {
        "line": 123,
        "file": "/app/Http/Controllers/TodoController.php"
    }
}
 

Request      

GET api/master-panel/todo/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

isApi   boolean  optional  

Optional. Defaults to true. Set to true to receive API formatted response. Example: false

id   integer  optional  

Optional. If provided, fetch a specific todo by this ID. Example: 17

search   string  optional  

Optional. Search term to filter todos by title or description. Example: consequatur

sort   string  optional  

Optional. Column name to sort by. Default: id. Example: consequatur

order   string  optional  

Optional. Sort order: asc or desc. Default: desc. Example: consequatur

limit   integer  optional  

Optional. Number of items per page for pagination. Default: 10. Example: 17

Meeting Managemant

Create a new meeting

requires authentication

This endpoint creates a new meeting within the current workspace. It validates the meeting date/time, ensures the creator is part of the participant list, and sends notifications to all participants.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/meeting" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Project Kickoff\",
    \"start_date\": \"2025-06-05\",
    \"end_date\": \"2025-06-05\",
    \"start_time\": \"10:00\",
    \"end_time\": \"11:30\",
    \"user_ids\": [
        1,
        2,
        3
    ],
    \"client_ids\": [
        5,
        6
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/meeting"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Project Kickoff",
    "start_date": "2025-06-05",
    "end_date": "2025-06-05",
    "start_time": "10:00",
    "end_time": "11:30",
    "user_ids": [
        1,
        2,
        3
    ],
    "client_ids": [
        5,
        6
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Meeting successfully created):


{
  "error": false,
  "message": "Meeting created successfully.",
  "data": {
    "id": 12,
    "data": {
      "id": 12,
      "title": "Project Kickoff",
      "start_date_time": "2025-06-05 10:00:00",
      "end_date_time": "2025-06-05 11:30:00",
      "workspace_id": 3,
      "admin_id": 1,
      ...
    }
  }
}
 

Example response (400, Missing workspace or user context):


{
    "error": true,
    "message": "Missing workspace or user context.",
    "data": []
}
 

Example response (422, Validation error):


{
    "error": true,
    "message": "Validation failed",
    "data": {
        "title": [
            "The title field is required."
        ],
        "start_date": [
            "The start date is required."
        ]
    }
}
 

Example response (500, Unexpected server error):


{
    "error": true,
    "message": "Meeting couldn't be created.",
    "data": {
        "error": "SQLSTATE[...]: Some database error",
        "line": 102,
        "file": "app/Http/Controllers/MeetingController.php"
    }
}
 

Request      

POST api/master-panel/meeting

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the meeting. Example: Project Kickoff

start_date   date   

The start date of the meeting (format: Y-m-d). Example: 2025-06-05

end_date   date   

The end date of the meeting (format: Y-m-d). Must be equal to or after start_date. Example: 2025-06-05

start_time   string   

The start time in 24-hour format (HH:mm). Example: 10:00

end_time   string   

The end time in 24-hour format (HH:mm). Must be after start_time if on the same day. Example: 11:30

user_ids   string[]  optional  

Optional array of internal user IDs to be added as participants.

client_ids   string[]  optional  

Optional array of client user IDs to be added as participants.

List Meetings

requires authentication

Retrieve a list of all meetings or a single meeting by ID, with support for search, filters, sort, and pagination.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/meeting/5?search=team+sync&sort=start_date_time&order=ASC&limit=10&status=ongoing&user_id=2&client_id=8&start_date_from=2025-06-01&start_date_to=2025-06-30&end_date_from=2025-06-01&end_date_to=2025-06-30&isApi=1" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/meeting/5"
);

const params = {
    "search": "team sync",
    "sort": "start_date_time",
    "order": "ASC",
    "limit": "10",
    "status": "ongoing",
    "user_id": "2",
    "client_id": "8",
    "start_date_from": "2025-06-01",
    "start_date_to": "2025-06-30",
    "end_date_from": "2025-06-01",
    "end_date_to": "2025-06-30",
    "isApi": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": false,
    "message": "Meetings retrieved successfully.",
    "data": {
        "total": 1,
        "data": [
            {
                "id": 5,
                "title": "Client Update Meeting",
                "start_date_time": "2025-06-10 10:00:00",
                "end_date_time": "2025-06-10 11:00:00",
                "users": "<ul>...</ul>",
                "clients": "<ul>...</ul>",
                "status": "Ongoing",
                "created_at": "2025-06-01 09:30:00",
                "updated_at": "2025-06-01 09:45:00",
                "actions": "<a>...</a>"
            }
        ]
    }
}
 

Example response (400):


{
    "status": true,
    "message": "Missing workspace or user context.",
    "data": []
}
 

Example response (404):


{
    "status": true,
    "message": "Meeting not found.",
    "data": []
}
 

Example response (422):


{
    "status": true,
    "message": "Validation failed.",
    "data": {
        "user_id": [
            "The selected user_id is invalid."
        ],
        "client_id": [
            "The selected client_id is invalid."
        ]
    }
}
 

Example response (500):


{
    "status": true,
    "message": "An error occurred while retrieving meetings.",
    "data": {
        "error": "SQLSTATE[HY000]: General error...",
        "file": "/app/Http/Controllers/MeetingsController.php",
        "line": 75
    }
}
 

Request      

GET api/master-panel/meeting/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

Optional. The ID of the meeting to retrieve. Example: 5

Query Parameters

search   string  optional  

Optional. Search by meeting title or ID. Example: team sync

sort   string  optional  

Optional. Field to sort by. Default is id. Example: start_date_time

order   string  optional  

Optional. Sort order (ASC or DESC). Default is DESC. Example: ASC

limit   integer  optional  

Optional. Number of results per page. Example: 10

status   string  optional  

Optional. Filter by meeting status. Options: ongoing, yet_to_start, ended. Example: ongoing

user_id   integer  optional  

Optional. Filter meetings assigned to a specific user. Example: 2

client_id   integer  optional  

Optional. Filter meetings assigned to a specific client. Example: 8

start_date_from   string  optional  

date Optional. Start date filter from (Y-m-d). Example: 2025-06-01

start_date_to   string  optional  

date Optional. Start date filter to (Y-m-d). Example: 2025-06-30

end_date_from   string  optional  

date Optional. End date filter from (Y-m-d). Example: 2025-06-01

end_date_to   string  optional  

date Optional. End date filter to (Y-m-d). Example: 2025-06-30

isApi   boolean  optional  

Optional. Default is true. Used to enable API-formatted responses. Example: true

Update a Meeting

requires authentication

Update the details of an existing meeting. Also supports assigning users and clients to the meeting, and notifies newly assigned participants.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/meeting/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Project Planning\",
    \"start_date\": \"2025-06-08\",
    \"end_date\": \"2025-06-08\",
    \"start_time\": \"10:00:00\",
    \"end_time\": \"11:30:00\",
    \"id\": 7,
    \"user_ids\": [
        1,
        4,
        5
    ],
    \"client_ids\": [
        2,
        8
    ],
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/meeting/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Project Planning",
    "start_date": "2025-06-08",
    "end_date": "2025-06-08",
    "start_time": "10:00:00",
    "end_time": "11:30:00",
    "id": 7,
    "user_ids": [
        1,
        4,
        5
    ],
    "client_ids": [
        2,
        8
    ],
    "isApi": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "status": false,
  "message": "meeting updated successfully.",
  "data": {
    "id": 7,
    "data": {
      "id": 7,
      "title": "Project Planning",
      "start_date_time": "2025-06-08 10:00:00",
      "end_date_time": "2025-06-08 11:30:00",
      "users": [...],
      "clients": [...],
      ...
    }
  }
}
 

Example response (404):


{
    "status": true,
    "message": "Meeting not found.",
    "data": []
}
 

Example response (422):


{
    "status": true,
    "message": "Validation failed.",
    "data": {
        "title": [
            "The title field is required."
        ],
        "start_date": [
            "The start date field is required."
        ],
        "end_date": [
            "The end date must be after or equal to start date."
        ],
        "end_time": [
            "End time must be after start time on the same day."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while updating the meeting."
}
 

Request      

PUT api/master-panel/meeting/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the meeting. Example: consequatur

Body Parameters

title   string   

The title of the meeting. Example: Project Planning

start_date   date   

Start date of the meeting (Y-m-d). Must be before or equal to end_date. Example: 2025-06-08

end_date   date   

End date of the meeting (Y-m-d). Must be after or equal to start_date. Example: 2025-06-08

start_time   string   

Start time in 24-hour format (H:i:s). Example: 10:00:00

end_time   string   

End time in 24-hour format (H:i:s). Must be after start_time if dates are the same. Example: 11:30:00

id   integer   

The ID of the meeting to update. Example: 7

user_ids   string[]  optional  

Optional. An array of user IDs to assign to the meeting.

client_ids   string[]  optional  

Optional. An array of client IDs to assign to the meeting.

isApi   boolean  optional  

Optional. Use true to get a standardized API response. Default is false. Example: true

Delete a Meeting

This endpoint allows you to delete a meeting by its ID. Only users with proper permissions can delete meetings.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/meeting/15" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/meeting/15"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Meeting deleted successfully.",
    "data": {
        "id": 15,
        "data": []
    }
}
 

Example response (404):


{
    "error": true,
    "message": "Meeting not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the meeting."
}
 

Request      

DELETE api/master-panel/meeting/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the meeting to delete. Example: 15

note Managemant

This endpoint allows you to delete a note by its ID. It performs a lookup for the note, deletes it using the DeletionService, and returns a formatted API response.

Create a new note.

This endpoint allows you to create a new note of type text or drawing. If the note type is drawing, you must provide valid drawing_data in base64-encoded SVG format. The note is associated with the current workspace and the authenticated user (either client or user).

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/note" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"note_type\": \"text\",
    \"title\": \"Project Kickoff Notes\",
    \"color\": \"#ffcc00\",
    \"description\": \"Discussed project milestones and timelines.\",
    \"drawing_data\": \"PHN2ZyB...\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/note"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "note_type": "text",
    "title": "Project Kickoff Notes",
    "color": "#ffcc00",
    "description": "Discussed project milestones and timelines.",
    "drawing_data": "PHN2ZyB..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Note created successfully.",
  "data": {
    "id": 12,
    "data": {
      "id": 12,
      "title": "Project Kickoff Notes",
      "note_type": "text",
      "color": "#ffcc00",
      "description": "Discussed project milestones and timelines.",
      "creator_id": "u_1",
      "workspace_id": 3,
      ...
    }
  }
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "note_type": [
            "The note type field is required."
        ],
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the note.",
    "data": {
        "error": "Exception message here"
    }
}
 

Request      

POST api/master-panel/note

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

note_type   string   

The type of note. Must be either text or drawing. Example: text

title   string   

The title of the note. Example: Project Kickoff Notes

color   string   

Color code or name for the note. Example: #ffcc00

description   string  optional  

The description or body content of the note (required for text notes). Example: Discussed project milestones and timelines.

drawing_data   string  optional  

The base64-encoded SVG content (required if note_type is drawing). Example: PHN2ZyB...

Update an existing note.

Updates the note identified by id with the provided data. Supports notes of type text or drawing. For drawing type, the drawing_data must be a base64-encoded string, which will be decoded.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/note/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 12,
    \"note_type\": \"text\",
    \"title\": \"Meeting notes\",
    \"color\": \"#FF5733\",
    \"description\": \"Detailed notes from the meeting\",
    \"drawing_data\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/note/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 12,
    "note_type": "text",
    "title": "Meeting notes",
    "color": "#FF5733",
    "description": "Detailed notes from the meeting",
    "drawing_data": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
   "error": false,
   "message": "Note updated successfully.",
   "data": {
      "id": 12,
      "data": {
         "id": 12,
         "note_type": "text",
         "title": "Meeting notes",
         "color": "#FF5733",
         "description": "Detailed notes from the meeting",
         "drawing_data": null,
         // ... other formatted note fields
      }
   }
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "note_type": [
            "The selected note type is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": "Detailed error message here",
    "message": "An error occurred while updating the note."
}
 

Request      

PUT api/master-panel/note/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the note. Example: consequatur

Body Parameters

id   integer   

The ID of the note to update. Example: 12

note_type   string   

The type of note, either text or drawing. Example: text

title   string   

The title of the note. Example: Meeting notes

color   string   

The color associated with the note. Example: #FF5733

description   string  optional  

nullable Optional description for the note. Example: Detailed notes from the meeting

drawing_data   string  optional  

required_if:note_type,drawing Base64-encoded SVG data for drawing notes. Example: consequatur

Delete a Note

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/note/7" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/note/7"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Note deleted successfully.",
    "data": {
        "id": 7,
        "title": "Project Kickoff Notes",
        "content": "Initial project meeting details...",
        "user_id": 3,
        "workspace_id": 2,
        "created_at": "2024-05-24T08:12:54.000000Z",
        "updated_at": "2024-06-01T10:20:41.000000Z"
    }
}
 

Example response (404):


{
    "success": false,
    "message": "No query results for model [App\\Models\\Note] 99",
    "data": []
}
 

Example response (500):


{
    "success": false,
    "message": "Something went wrong while deleting the note.",
    "data": []
}
 

Request      

DELETE api/master-panel/note/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the note to delete. Example: 7

Get All Notes or a Specific Note This endpoint retrieves either: - A list of all notes (if no ID is provided), or - A single note by its ID (if provided). Notes are filtered by the current workspace and admin context.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/note/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/note/3"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Notes retrieved successfully.",
    "data": {
        "total": 2,
        "data": [
            {
                "id": 1,
                "title": "Sprint Planning",
                "note_type": "text",
                "color": "#ffffff",
                "workspace_id": 1,
                "admin_id": 1,
                "creator_id": "u_3",
                "created_at": "2025-06-01T12:00:00.000000Z",
                "updated_at": "2025-06-01T12:30:00.000000Z"
            },
            {
                "id": 2,
                "title": "UI Wireframe",
                "note_type": "drawing",
                "color": "#000000",
                "workspace_id": 1,
                "admin_id": 1,
                "creator_id": "u_3",
                "created_at": "2025-06-02T08:45:00.000000Z",
                "updated_at": "2025-06-02T09:15:00.000000Z"
            }
        ]
    }
}
 

Example response (200):


{
    "success": true,
    "message": "Note retrieved successfully.",
    "data": {
        "total": 1,
        "data": [
            {
                "id": 3,
                "title": "Design Plan",
                "note_type": "drawing",
                "color": "#ffdd00",
                "workspace_id": 1,
                "admin_id": 1,
                "creator_id": "u_5",
                "created_at": "2025-06-03T10:00:00.000000Z",
                "updated_at": "2025-06-03T10:30:00.000000Z"
            }
        ]
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Note not found.",
    "data": []
}
 

Example response (500):


{
    "success": false,
    "message": "Failed to retrieve notes.",
    "data": {
        "error": "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'notes' doesn't exist"
    }
}
 

Request      

GET api/master-panel/note/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the note to retrieve. Example: 3

Activitylog

Returns a paginated list of activity logs, or a single activity log if an ID is provided. Supports filtering, searching, and pagination.

Get a list of activity logs or a single activity log by ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/activity-log/1?search=login&sort=created_at&order=ASC&date_from=2024-01-01&date_to=2024-01-31&user_ids[]=1&user_ids[]=2&client_ids[]=3&client_ids[]=4&activities[]=created&activities[]=updated&types[]=task&types[]=project&type=task&type_id=5&offset=0&limit=10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/activity-log/1"
);

const params = {
    "search": "login",
    "sort": "created_at",
    "order": "ASC",
    "date_from": "2024-01-01",
    "date_to": "2024-01-31",
    "user_ids[0]": "1",
    "user_ids[1]": "2",
    "client_ids[0]": "3",
    "client_ids[1]": "4",
    "activities[0]": "created",
    "activities[1]": "updated",
    "types[0]": "task",
    "types[1]": "project",
    "type": "task",
    "type_id": "5",
    "offset": "0",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Activity logs retrieved successfully",
    "data": [
        {
            "id": 1,
            "actor_id": 2,
            "actor_name": "John Doe",
            "actor_type": "User",
            "type_id": 3,
            "parent_type_id": 4,
            "type": "Task",
            "parent_type": "Project",
            "type_title": "Task Title",
            "parent_type_title": "Project Title",
            "activity": "Created",
            "message": "Task created successfully.",
            "created_at": "2024-01-01 12:00:00",
            "updated_at": "2024-01-01 12:00:00",
            "actions": "-"
        }
    ],
    "total": 1
}
 

Request      

GET api/master-panel/activity-log/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the activity log to retrieve. Example: 1

Query Parameters

search   string  optional  

Search term for activity logs. Example: login

sort   string  optional  

Field to sort by. Default: id. Example: created_at

order   string  optional  

Sort order (ASC or DESC). Default: DESC. Example: ASC

date_from   string  optional  

Filter by start date (Y-m-d). Example: 2024-01-01

date_to   string  optional  

Filter by end date (Y-m-d). Example: 2024-01-31

user_ids   string[]  optional  

Filter by user IDs.

client_ids   string[]  optional  

Filter by client IDs.

activities   string[]  optional  

Filter by activity types.

types   string[]  optional  

Filter by log types.

type   string  optional  

Filter by a specific type. Example: task

type_id   integer  optional  

Filter by a specific type ID. Example: 5

offset   integer  optional  

Pagination offset. Default: 0. Example: 0

limit   integer  optional  

Pagination limit. Default: 10. Example: 10

Delete an activity log record by ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/activity-log/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/activity-log/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Record deleted successfully."
}
 

Request      

DELETE api/master-panel/activity-log/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the activity log to delete. Example: 1

Notifications

List notifications for the authenticated user or specified user/client.

List notifications (API)

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/notification/consequatur?search=project&sort=id&order=DESC&status=unread&type=project&user_id=1&client_id=2&limit=10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/notification/consequatur"
);

const params = {
    "search": "project",
    "sort": "id",
    "order": "DESC",
    "status": "unread",
    "type": "project",
    "user_id": "1",
    "client_id": "2",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "rows": [
        {
            "id": 1,
            "title": "Title",
            "users": [],
            "clients": [],
            "type_id": 1,
            "message": "Message text",
            "type": "Project",
            "read_at": "2024-06-27 10:00:00",
            "created_at": "2024-06-27 10:00:00",
            "updated_at": "2024-06-27 10:00:00"
        }
    ],
    "total": 1
}
 

Request      

GET api/master-panel/notification/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

search   string  optional  

Optional search term. Example: project

sort   string  optional  

Field to sort by. Default: id. Example: id

order   string  optional  

Sort order (ASC|DESC). Default: DESC. Example: DESC

status   string  optional  

Filter by read/unread. Example: unread

type   string  optional  

Filter by notification type. Example: project

user_id   integer  optional  

Filter by user ID (admin only). Example: 1

client_id   integer  optional  

Filter by client ID (admin only). Example: 2

limit   integer  optional  

Results per page. Example: 10

Remove the specified notification.

requires authentication

This endpoint deletes a notification based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/notification/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/notification/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Notification deleted successfully.",
    "data": []
}
 

Example response (200):


{
    "error": true,
    "message": "Notification not found.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the notification."
}
 

Request      

DELETE api/master-panel/notification/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the notification to be deleted. Example: 1

Mark all notifications as read (API)

requires authentication

Marks all notifications for the authenticated user as read and returns the updated notifications using the formatNotification helper.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/master-panel/notifications/mark-as-read/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/notifications/mark-as-read/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "All notifications marked as read.",
  "data": [
    { "id": 1, "title": "...", ...notification fields... }
  ]
}
 

Example response (401):


{
    "error": true,
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while marking notifications as read."
}
 

Request      

PATCH api/master-panel/notifications/mark-as-read/{id?}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Contracts

GET api/master-panel/contracts/{id?}

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/contracts/consequatur?id=17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/contracts/consequatur"
);

const params = {
    "id": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
  "message": "Contracts fetched successfully.",
  "data": [
    {
      "id": 1,
      "title": "Sample Contract",
      "value": "1000.00",
      "start_date": "2024-01-01",
      "end_date": "2024-12-31",
      ...
    }
  ]
}
 

Request      

GET api/master-panel/contracts/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

id   integer  optional  

Optional. The ID of the contract to fetch. Example: 17

POST api/master-panel/contracts

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/contracts" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"consequatur\",
    \"value\": 11613.31890586,
    \"start_date\": \"consequatur\",
    \"end_date\": \"consequatur\",
    \"client_id\": 17,
    \"project_id\": 17,
    \"contract_type_id\": 17,
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/contracts"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "consequatur",
    "value": 11613.31890586,
    "start_date": "consequatur",
    "end_date": "consequatur",
    "client_id": 17,
    "project_id": 17,
    "contract_type_id": 17,
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "message": "Contract created successfully.",
  "data": {
    "id": 1,
    "title": "Sample Contract",
    ...
  }
}
 

Request      

POST api/master-panel/contracts

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The contract title. Example: consequatur

value   number   

The contract value. Example: 11613.31890586

start_date   date   

The start date (Y-m-d). Example: consequatur

end_date   date   

The end date (Y-m-d). Example: consequatur

client_id   integer   

The client ID. Example: 17

project_id   integer   

The project ID. Example: 17

contract_type_id   integer   

The contract type ID. Example: 17

description   string  optional  

The contract description. Example: Dolores dolorum amet iste laborum eius est dolor.

PUT api/master-panel/contracts/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/contracts/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 17,
    \"title\": \"consequatur\",
    \"value\": 11613.31890586,
    \"start_date\": \"consequatur\",
    \"end_date\": \"consequatur\",
    \"client_id\": 17,
    \"project_id\": 17,
    \"contract_type_id\": 17,
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/contracts/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 17,
    "title": "consequatur",
    "value": 11613.31890586,
    "start_date": "consequatur",
    "end_date": "consequatur",
    "client_id": 17,
    "project_id": 17,
    "contract_type_id": 17,
    "description": "Dolores dolorum amet iste laborum eius est dolor."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "message": "Contract updated successfully.",
  "data": {
    "id": 1,
    "title": "Updated Contract",
    ...
  }
}
 

Request      

PUT api/master-panel/contracts/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contract. Example: consequatur

Body Parameters

id   integer   

The ID of the contract to update. Example: 17

title   string   

The contract title. Example: consequatur

value   number   

The contract value. Example: 11613.31890586

start_date   date   

The start date (Y-m-d). Example: consequatur

end_date   date   

The end date (Y-m-d). Example: consequatur

client_id   integer   

The client ID. Example: 17

project_id   integer   

The project ID. Example: 17

contract_type_id   integer   

The contract type ID. Example: 17

description   string  optional  

The contract description. Example: Dolores dolorum amet iste laborum eius est dolor.

DELETE api/master-panel/contracts/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/contracts/17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/contracts/17"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Contract deleted successfully."
}
 

Example response (404):


{
    "error": true,
    "message": "Contract not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the contract."
}
 

Request      

DELETE api/master-panel/contracts/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contract to delete. Example: 17

POST api/master-panel/contract-types/store

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/contract-types/store" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/contract-types/store"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Contract type created successfully.",
  "id": 1,
  "title": "NDA",
  "type": "contract_type",
  "ct": { ... }
}
 

Example response (400):


{
    "error": true,
    "message": "Contract type couldn't created."
}
 

Request      

POST api/master-panel/contract-types/store

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   string   

The contract type name. Example: consequatur

GET api/master-panel/contract-types/list

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/contract-types/list?search=consequatur&sort=consequatur&order=consequatur&limit=17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/contract-types/list"
);

const params = {
    "search": "consequatur",
    "sort": "consequatur",
    "order": "consequatur",
    "limit": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "rows": [
        {
            "id": 1,
            "type": "NDA"
        },
        {
            "id": 2,
            "type": "MSA"
        }
    ],
    "total": 2
}
 

Request      

GET api/master-panel/contract-types/list

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

search   string  optional  

Optional. Search by contract type name or ID. Example: consequatur

sort   string  optional  

Optional. Field to sort by. Default is "id". Example: consequatur

order   string  optional  

Optional. Sort order (ASC or DESC). Default is "DESC". Example: consequatur

limit   integer  optional  

Optional. Number of results per page. Example: 17

DELETE api/master-panel/contract-types/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/contract-types/17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/contract-types/17"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Contract type deleted successfully."
}
 

Example response (400):


{
    "error": true,
    "message": "Cannot delete this contract type as it is associated with one or more contracts."
}
 

Example response (404):


{
    "error": true,
    "message": "Contract type not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the contract type."
}
 

Request      

DELETE api/master-panel/contract-types/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contract type to delete. Example: 17

PUT api/master-panel/contracts-types/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/contracts-types/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 17,
    \"type\": \"consequatur\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/contracts-types/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 17,
    "type": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Contract type updated successfully.",
  "id": 1,
  "title": "NDA",
  "type": "contract_type",
  "ct": { ... }
}
 

Example response (400):


{
    "error": true,
    "message": "Contract type couldn't be updated."
}
 

Request      

PUT api/master-panel/contracts-types/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the contracts type. Example: consequatur

Body Parameters

id   integer   

The ID of the contract type to update. Example: 17

type   string   

The contract type name. Example: consequatur

Allowances

POST api/master-panel/allowances

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/allowances" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"consequatur\",
    \"amount\": 11613.31890586
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/allowances"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "consequatur",
    "amount": 11613.31890586
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Allowance created successfully.",
  "id": 1,
  "data": {
    "id": 1,
    "title": "Travel Allowance",
    "amount": 1500,
    ...
  }
}
 

Example response (400):


{
    "error": true,
    "message": "Allowance couldn't be created."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

POST api/master-panel/allowances

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The allowance title. Example: consequatur

amount   number   

The allowance amount. Example: 11613.31890586

GET api/master-panel/allowances/{id?}

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/allowances/consequatur?id=17&search=consequatur&sort=consequatur&order=consequatur&limit=17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/allowances/consequatur"
);

const params = {
    "id": "17",
    "search": "consequatur",
    "sort": "consequatur",
    "order": "consequatur",
    "limit": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Allowances fetched successfully.",
  "rows": [
    { "id": 1, "title": "Travel Allowance", "amount": 1500, ... }
  ],
  "total": 1
}
 

Example response (404):


{
    "error": true,
    "message": "Allowance not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

GET api/master-panel/allowances/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

id   integer  optional  

Optional. The ID of the allowance to fetch. Example: 17

search   string  optional  

Optional. Search by title, amount, or ID. Example: consequatur

sort   string  optional  

Optional. Field to sort by. Default is "id". Example: consequatur

order   string  optional  

Optional. Sort order (ASC or DESC). Default is "DESC". Example: consequatur

limit   integer  optional  

Optional. Number of results per page. Example: 17

DELETE api/master-panel/allowances/{id}

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/allowances/17" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/allowances/17"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Allowance(s) deleted successfully.",
    "id": [
        1
    ],
    "titles": [
        "Travel Allowance"
    ]
}
 

Example response (404):


{
    "error": true,
    "message": "Allowance not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

DELETE api/master-panel/allowances/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the allowance to delete. Example: 17

PUT api/master-panel/allowances/{id}

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/allowances/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 17,
    \"title\": \"consequatur\",
    \"amount\": 11613.31890586
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/allowances/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 17,
    "title": "consequatur",
    "amount": 11613.31890586
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Allowance updated successfully.",
  "id": 1,
  "data": {
    "id": 1,
    "title": "Updated Allowance",
    "amount": 2000,
    ...
  }
}
 

Example response (400):


{
    "error": true,
    "message": "Allowance couldn't be updated."
}
 

Example response (404):


{
    "error": true,
    "message": "Allowance not found."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

PUT api/master-panel/allowances/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the allowance. Example: consequatur

Body Parameters

id   integer   

The ID of the allowance to update. Example: 17

title   string   

The allowance title. Example: consequatur

amount   number   

The allowance amount. Example: 11613.31890586

Deductions

Create Deduction

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/deductions" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"isApi\": true,
    \"title\": \"Provident Fund\",
    \"type\": \"amount\",
    \"amount\": 500,
    \"percentage\": 10
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/deductions"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "isApi": true,
    "title": "Provident Fund",
    "type": "amount",
    "amount": 500,
    "percentage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
  "error": false,
  "message": "Deduction created successfully.",
  "id": 1,
  "data": {"id":1, ...}
}
 

Example response (400, Validation error):


{
    "error": true,
    "message": "..."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

POST api/master-panel/deductions

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

isApi   boolean   

Set to true for API response. Example: true

title   string   

The deduction title. Example: Provident Fund

type   string   

The deduction type (amount or percentage). Example: amount

amount   number   

if type=amount The deduction amount. Example: 500

percentage   number   

if type=percentage The deduction percentage. Example: 10

List Deductions (API)

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/deductions/consequatur?id=5&search=Provident&sort=title&order=ASC&limit=10" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/deductions/consequatur"
);

const params = {
    "id": "5",
    "search": "Provident",
    "sort": "title",
    "order": "ASC",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, List):


{
  "error": false,
  "message": "Deductions fetched successfully.",
  "total": 2,
  "rows": [
    {"id":1,"title":"Provident Fund", ...},
    {"id":2,"title":"TDS", ...}
  ]
}
 

Example response (200, Single):


{
  "error": false,
  "message": "Deduction fetched successfully.",
  "data": {"id":1,"title":"Provident Fund", ...}
}
 

Example response (404, Not found):


{
    "error": true,
    "message": "Deduction not found."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

GET api/master-panel/deductions/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

id   integer  optional  

Optional. If provided, returns the deduction with this ID. Example: 5

search   string  optional  

Optional. Search term for deductions. Example: Provident

sort   string  optional  

Optional. Sort field. Default: id. Example: title

order   string  optional  

Optional. Sort order. Default: DESC. Example: ASC

limit   integer  optional  

Optional. Pagination limit. Default: 10. Example: 10

Update Deduction

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/deductions/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"isApi\": true,
    \"id\": 1,
    \"title\": \"Provident Fund\",
    \"type\": \"amount\",
    \"amount\": 500,
    \"percentage\": 10
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/deductions/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "isApi": true,
    "id": 1,
    "title": "Provident Fund",
    "type": "amount",
    "amount": 500,
    "percentage": 10
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
  "error": false,
  "message": "Deduction updated successfully.",
  "id": 1,
  "data": {"id":1, ...}
}
 

Example response (400, Validation error):


{
    "error": true,
    "message": "..."
}
 

Example response (404, Not found):


{
    "error": true,
    "message": "Deduction not found."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

PUT api/master-panel/deductions/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the deduction. Example: consequatur

Body Parameters

isApi   boolean   

Set to true for API response. Example: true

id   integer   

The ID of the deduction. Example: 1

title   string   

The deduction title. Example: Provident Fund

type   string   

The deduction type (amount or percentage). Example: amount

amount   number   

if type=amount The deduction amount. Example: 500

percentage   number   

if type=percentage The deduction percentage. Example: 10

Delete Deduction(s)

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/deductions/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"isApi\": true,
    \"ids\": [
        1,
        2
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/deductions/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "isApi": true,
    "ids": [
        1,
        2
    ]
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
    "error": false,
    "message": "Deduction(s) deleted successfully.",
    "id": [
        1,
        2
    ],
    "titles": [
        "Provident Fund",
        "TDS"
    ]
}
 

Example response (400, Validation error):


{
    "error": true,
    "message": "..."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

DELETE api/master-panel/deductions/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the deduction. Example: consequatur

Body Parameters

isApi   boolean   

Set to true for API response. Example: true

ids   string[]   

The IDs of the deductions to delete.

Payslips

Create Payslip

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/payslips" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"isApi\": true,
    \"user_id\": 2,
    \"month\": \"2024-06\",
    \"basic_salary\": 50000,
    \"working_days\": 22,
    \"lop_days\": 2,
    \"paid_days\": 20,
    \"bonus\": 1000,
    \"incentives\": 500,
    \"leave_deduction\": 200,
    \"ot_hours\": 5,
    \"ot_rate\": 100,
    \"ot_payment\": 500,
    \"total_allowance\": 1500,
    \"total_deductions\": 300,
    \"total_earnings\": 52000,
    \"net_pay\": 51700,
    \"payment_method_id\": 1,
    \"payment_date\": \"2024-06-30\",
    \"status\": 1,
    \"note\": \"June payslip\",
    \"allowances\": [
        1,
        2
    ],
    \"deductions\": [
        1,
        2
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/payslips"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "isApi": true,
    "user_id": 2,
    "month": "2024-06",
    "basic_salary": 50000,
    "working_days": 22,
    "lop_days": 2,
    "paid_days": 20,
    "bonus": 1000,
    "incentives": 500,
    "leave_deduction": 200,
    "ot_hours": 5,
    "ot_rate": 100,
    "ot_payment": 500,
    "total_allowance": 1500,
    "total_deductions": 300,
    "total_earnings": 52000,
    "net_pay": 51700,
    "payment_method_id": 1,
    "payment_date": "2024-06-30",
    "status": 1,
    "note": "June payslip",
    "allowances": [
        1,
        2
    ],
    "deductions": [
        1,
        2
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
  "error": false,
  "message": "Payslip created successfully.",
  "id": 1,
  "data": {"id":1, ...}
}
 

Example response (400, Validation error):


{
    "error": true,
    "message": "..."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

POST api/master-panel/payslips

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

isApi   boolean   

Set to true for API response. Example: true

user_id   integer   

The user ID. Example: 2

month   string   

The month (YYYY-MM). Example: 2024-06

basic_salary   number  optional  

required. Example: 50000

working_days   integer  optional  

required. Example: 22

lop_days   integer  optional  

required. Example: 2

paid_days   integer  optional  

required. Example: 20

bonus   number  optional  

required. Example: 1000

incentives   number  optional  

required. Example: 500

leave_deduction   number  optional  

required. Example: 200

ot_hours   integer  optional  

required. Example: 5

ot_rate   number  optional  

required. Example: 100

ot_payment   number  optional  

required. Example: 500

total_allowance   number  optional  

required. Example: 1500

total_deductions   number  optional  

required. Example: 300

total_earnings   number  optional  

required. Example: 52000

net_pay   number  optional  

required. Example: 51700

payment_method_id   integer  optional  

optional. Example: 1

payment_date   string  optional  

optional. Example: 2024-06-30

status   integer  optional  

required. Example: 1

note   string  optional  

optional. Example: June payslip

allowances   string[]  optional  

optional.

deductions   string[]  optional  

optional.

List Payslips (API)

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/payslips/consequatur?id=5&search=PSL-2024&sort=month&order=ASC&status=1&user_id=3&created_by=2&month=2024-06&limit=10" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/payslips/consequatur"
);

const params = {
    "id": "5",
    "search": "PSL-2024",
    "sort": "month",
    "order": "ASC",
    "status": "1",
    "user_id": "3",
    "created_by": "2",
    "month": "2024-06",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, List):


{
  "error": false,
  "message": "Payslips fetched successfully.",
  "total": 2,
  "rows": [
    {"id":1,"user":"John Doe", ...},
    {"id":2,"user":"Jane Smith", ...}
  ]
}
 

Example response (200, Single):


{
  "error": false,
  "message": "Payslip fetched successfully.",
  "data": {"id":1,"user":"John Doe", ...}
}
 

Example response (404, Not found):


{
    "error": true,
    "message": "Payslip not found."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

GET api/master-panel/payslips/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

id   integer  optional  

Optional. If provided, returns the payslip with this ID. Example: 5

search   string  optional  

Optional. Search term for payslips. Example: PSL-2024

sort   string  optional  

Optional. Sort field. Default: id. Example: month

order   string  optional  

Optional. Sort order. Default: DESC. Example: ASC

status   integer  optional  

Optional. Filter by status (0=Unpaid, 1=Paid). Example: 1

user_id   integer  optional  

Optional. Filter by user. Example: 3

created_by   integer  optional  

Optional. Filter by creator. Example: 2

month   string  optional  

Optional. Filter by month (YYYY-MM). Example: 2024-06

limit   integer  optional  

Optional. Pagination limit. Default: 15. Example: 10

Update Payslip

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/payslips/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"isApi\": true,
    \"id\": 1,
    \"user_id\": 2,
    \"month\": \"2024-06\",
    \"basic_salary\": 50000,
    \"working_days\": 22,
    \"lop_days\": 2,
    \"paid_days\": 20,
    \"bonus\": 1000,
    \"incentives\": 500,
    \"leave_deduction\": 200,
    \"ot_hours\": 5,
    \"ot_rate\": 100,
    \"ot_payment\": 500,
    \"total_allowance\": 1500,
    \"total_deductions\": 300,
    \"total_earnings\": 52000,
    \"net_pay\": 51700,
    \"payment_method_id\": 1,
    \"payment_date\": \"2024-06-30\",
    \"status\": 1,
    \"note\": \"June payslip\",
    \"allowances\": [
        1,
        2
    ],
    \"deductions\": [
        1,
        2
    ]
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/payslips/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "isApi": true,
    "id": 1,
    "user_id": 2,
    "month": "2024-06",
    "basic_salary": 50000,
    "working_days": 22,
    "lop_days": 2,
    "paid_days": 20,
    "bonus": 1000,
    "incentives": 500,
    "leave_deduction": 200,
    "ot_hours": 5,
    "ot_rate": 100,
    "ot_payment": 500,
    "total_allowance": 1500,
    "total_deductions": 300,
    "total_earnings": 52000,
    "net_pay": 51700,
    "payment_method_id": 1,
    "payment_date": "2024-06-30",
    "status": 1,
    "note": "June payslip",
    "allowances": [
        1,
        2
    ],
    "deductions": [
        1,
        2
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, Success):


{
  "error": false,
  "message": "Payslip updated successfully.",
  "id": 1,
  "data": {"id":1, ...}
}
 

Example response (400, Validation error):


{
    "error": true,
    "message": "..."
}
 

Example response (404, Not found):


{
    "error": true,
    "message": "Payslip not found."
}
 

Example response (500, Error):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

PUT api/master-panel/payslips/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the payslip. Example: consequatur

Body Parameters

isApi   boolean   

Set to true for API response. Example: true

id   integer   

The ID of the payslip. Example: 1

user_id   integer   

The user ID. Example: 2

month   string   

The month (YYYY-MM). Example: 2024-06

basic_salary   number  optional  

required. Example: 50000

working_days   integer  optional  

required. Example: 22

lop_days   integer  optional  

required. Example: 2

paid_days   integer  optional  

required. Example: 20

bonus   number  optional  

required. Example: 1000

incentives   number  optional  

required. Example: 500

leave_deduction   number  optional  

required. Example: 200

ot_hours   integer  optional  

required. Example: 5

ot_rate   number  optional  

required. Example: 100

ot_payment   number  optional  

required. Example: 500

total_allowance   number  optional  

required. Example: 1500

total_deductions   number  optional  

required. Example: 300

total_earnings   number  optional  

required. Example: 52000

net_pay   number  optional  

required. Example: 51700

payment_method_id   integer  optional  

optional. Example: 1

payment_date   string  optional  

optional. Example: 2024-06-30

status   integer  optional  

required. Example: 1

note   string  optional  

optional. Example: June payslip

allowances   string[]  optional  

optional.

deductions   string[]  optional  

optional.

Expenses & Expense Types

Store a new expense.

Create a new expense record in the workspace.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/expenses" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"\\\"Travel Reimbursement\\\"\",
    \"expense_type_id\": 1,
    \"user_id\": 3,
    \"amount\": 150.75,
    \"expense_date\": \"\\\"2024-06-30\\\"\",
    \"note\": \"\\\"Taxi fare for client meeting.\\\"\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/expenses"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "\"Travel Reimbursement\"",
    "expense_type_id": 1,
    "user_id": 3,
    "amount": 150.75,
    "expense_date": "\"2024-06-30\"",
    "note": "\"Taxi fare for client meeting.\""
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Expense created successfully.",
  "id": 12,
  "expenses": {"id": 12, "title": "Travel Reimbursement", ...}
}
 

Example response (400):


{
    "error": true,
    "message": "Expense couldn't be created."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

POST api/master-panel/expenses

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the expense. Example: "Travel Reimbursement"

expense_type_id   integer   

The ID of the expense type. Example: 1

user_id   integer   

The ID of the user. Example: 3

amount   number   

The amount of the expense. Example: 150.75

expense_date   date   

The date of the expense. Example: "2024-06-30"

note   string  optional  

Optional note for the expense. Example: "Taxi fare for client meeting."

List expenses (API).

Get a paginated list of expenses or a single expense by ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/expenses/consequatur?id=12&search=%22Travel%22&sort=%22id%22&order=%22DESC%22&type_id=1&user_id=3&date_from=%222024-06-01%22&date_to=%222024-06-30%22&limit=10" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/expenses/consequatur"
);

const params = {
    "id": "12",
    "search": ""Travel"",
    "sort": ""id"",
    "order": ""DESC"",
    "type_id": "1",
    "user_id": "3",
    "date_from": ""2024-06-01"",
    "date_to": ""2024-06-30"",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Expenses retrieved.",
  "data": {
    "rows": [{"id": 12, "title": "Travel Reimbursement", ...}],
    "total": 1
  }
}
 

Example response (404):


{
    "error": true,
    "message": "Expense not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

GET api/master-panel/expenses/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

The ID of the . Example: consequatur

Query Parameters

id   integer  optional  

The ID of the expense to fetch. Example: 12

search   string  optional  

Search term for filtering expenses. Example: "Travel"

sort   string  optional  

Field to sort by. Example: "id"

order   string  optional  

Sort order (ASC or DESC). Example: "DESC"

type_id   integer  optional  

Filter by expense type ID. Example: 1

user_id   integer  optional  

Filter by user ID. Example: 3

date_from   string  optional  

date Filter expenses from this date. Example: "2024-06-01"

date_to   string  optional  

date Filter expenses up to this date. Example: "2024-06-30"

limit   integer  optional  

Number of records per page. Example: 10

Update an expense.

Update an existing expense record by ID.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/expenses/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 12,
    \"title\": \"\\\"Updated Title\\\"\",
    \"expense_type_id\": 1,
    \"user_id\": 3,
    \"amount\": 200,
    \"expense_date\": \"\\\"2024-07-01\\\"\",
    \"note\": \"\\\"Updated note.\\\"\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/expenses/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 12,
    "title": "\"Updated Title\"",
    "expense_type_id": 1,
    "user_id": 3,
    "amount": 200,
    "expense_date": "\"2024-07-01\"",
    "note": "\"Updated note.\""
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Expense updated successfully.",
    "id": 12
}
 

Example response (400):


{
    "error": true,
    "message": "Expense couldn't be updated."
}
 

Example response (404):


{
    "error": true,
    "message": "Expense not found."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

PUT api/master-panel/expenses/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the expense. Example: consequatur

Body Parameters

id   integer   

The ID of the expense. Example: 12

title   string   

The title of the expense. Example: "Updated Title"

expense_type_id   integer   

The ID of the expense type. Example: 1

user_id   integer   

The ID of the user. Example: 3

amount   number   

The amount of the expense. Example: 200

expense_date   date   

The date of the expense. Example: "2024-07-01"

note   string  optional  

Optional note for the expense. Example: "Updated note."

Delete an expense.

Delete an expense by ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/expenses/12" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/expenses/12"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Expense deleted successfully.",
    "id": 12,
    "title": "Travel Reimbursement"
}
 

Example response (404):


{
    "error": true,
    "message": "Expense not found."
}
 

Request      

DELETE api/master-panel/expenses/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the expense. Example: 12

Store a new expense type.

Create a new expense type in the workspace.

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/expense-type" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"\\\"Travel\\\"\",
    \"description\": \"\\\"Expenses related to travel.\\\"\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/expense-type"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "\"Travel\"",
    "description": "\"Expenses related to travel.\""
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Expense type created successfully.",
  "id": 1,
  "expenses": {"id": 1, "title": "Travel", ...}
}
 

Example response (400):


{
    "error": true,
    "message": "Expense type couldn't be created."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

POST api/master-panel/expense-type

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

The title of the expense type. Example: "Travel"

description   string  optional  

Optional description. Example: "Expenses related to travel."

Update an expense type.

Update an existing expense type by ID.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/expense-type/consequatur" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"title\": \"\\\"Updated Type\\\"\",
    \"description\": \"\\\"Updated description.\\\"\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/expense-type/consequatur"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "title": "\"Updated Type\"",
    "description": "\"Updated description.\""
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Expense Type updated successfully.",
    "id": 1
}
 

Example response (400):


{
    "error": true,
    "message": "Expense Type couldn't be updated."
}
 

Example response (404):


{
    "error": true,
    "message": "Expense type not found."
}
 

Example response (422):


{
    "error": true,
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

PUT api/master-panel/expense-type/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the expense type. Example: consequatur

Body Parameters

id   integer   

The ID of the expense type. Example: 1

title   string   

The title of the expense type. Example: "Updated Type"

description   string  optional  

Optional description. Example: "Updated description."

Delete an expense type.

Delete an expense type by ID. Will fail if the type is assigned to any expenses.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/expense-type/1" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/expense-type/1"
);

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Expense type deleted successfully.",
    "id": 1,
    "title": "Travel",
    "type": "expense_type"
}
 

Example response (400):


{
    "error": true,
    "message": "Cannot delete this expense type as it is associated with one or more expenses."
}
 

Example response (404):


{
    "error": true,
    "message": "Expense type not found."
}
 

Request      

DELETE api/master-panel/expense-type/{id}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the expense type. Example: 1

List or fetch expense types (API).

Get a paginated list of expense types or a single expense type by ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/expense-type/1?search=%22Travel%22&sort=%22id%22&order=%22DESC%22&limit=10" \
    --header "workspace_id:: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/expense-type/1"
);

const params = {
    "search": ""Travel"",
    "sort": ""id"",
    "order": ""DESC"",
    "limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id:": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
  "error": false,
  "message": "Expense types fetched successfully.",
  "data": {
    "rows": [{"id": 1, "title": "Travel", ...}],
    "total": 1
  }
}
 

Example response (404):


{
    "error": true,
    "message": "Expense type not found."
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred: ..."
}
 

Request      

GET api/master-panel/expense-type/{id?}

Headers

workspace_id:      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

The ID of the expense type to fetch. Example: 1

Query Parameters

search   string  optional  

Search term for filtering expense types. Example: "Travel"

sort   string  optional  

Field to sort by. Example: "id"

order   string  optional  

Sort order (ASC or DESC). Example: "DESC"

limit   integer  optional  

Number of records per page. Example: 10

Setting Management

Retrieve the settings for a specific variable.

requires authentication

This endpoint returns the settings for a given variable. The user must be authenticated.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/settings/general_settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/settings/general_settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Settings retrieved successfully",
    "settings": {
        "company_title": "Taskify SaaS",
        "currency_full_form": "Indian Rupee",
        "currency_symbol": "₹",
        "currency_code": "INR",
        "currency_symbol_position": "before",
        "currency_formate": "comma_separated",
        "decimal_points_in_currency": "2",
        "allowed_max_upload_size": "2000",
        "allowSignup": 1,
        "timezone": "Asia/Kolkata",
        "date_format": "DD-MM-YYYY|d-m-Y",
        "time_format": "H:i:s",
        "toast_position": "toast-bottom-center",
        "toast_time_out": "2",
        "footer_text": "<p>made with ❤️ by <a href=\"https://www.infinitietech.com/\" target=\"_blank\" rel=\"noopener\">Infinitie Technologies</a></p>",
        "full_logo": "https://test-taskify.infinitietech.com/storage/logos/zEy4tSCAFSMczWbOoxBZ3B43Nc9eeqMlNBXDrOzn.png",
        "half_logo": null,
        "favicon": "https://test-taskify.infinitietech.com/storage/logos/2FZTNY1qDTz7CTtwWC8Hh1eY4l7cIHgOXG2stVIU.png"
    }
}
 

Example response (401):


{
    "error": true,
    "message": "Un Authorized Action!"
}
 

Example response (404):


{
    "error": true,
    "message": "Setting not found"
}
 

Request      

GET api/settings/{variable}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

variable   string   

The variable type for which settings are to be retrieved. Must be one of the following: general_settings, pusher_settings, email_settings, media_storage_settings, sms_gateway_settings, whatsapp_settings, privacy_policy, about_us, terms_conditions. Example: general_settings

leaverequest Managemant

This endpoint allows a user, admin, or leave editor to create a leave request.

Create a Leave Request

Example request:
curl --request POST \
    "http://localhost:8000/api/master-panel/leaverequest" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"Family function\",
    \"from_date\": \"2025-06-10\",
    \"to_date\": \"2025-06-12\",
    \"partialLeave\": true,
    \"from_time\": \"10:00\",
    \"to_time\": \"14:00\",
    \"status\": \"pending\",
    \"leaveVisibleToAll\": true,
    \"visible_to_ids\": [
        3,
        5,
        7
    ],
    \"user_id\": 9,
    \"isApi\": true
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/leaverequest"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "Family function",
    "from_date": "2025-06-10",
    "to_date": "2025-06-12",
    "partialLeave": true,
    "from_time": "10:00",
    "to_time": "14:00",
    "status": "pending",
    "leaveVisibleToAll": true,
    "visible_to_ids": [
        3,
        5,
        7
    ],
    "user_id": 9,
    "isApi": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
 "error": false,
 "message": "Leave request created successfully.",
 "id": 13,
 "type": "leave_request",
 "data": {
   "id": 13,
   "user_id": 9,
   "reason": "Family function",
   "from_date": "2025-06-10",
   "to_date": "2025-06-12",
   "from_time": null,
   "to_time": null,
   "status": "pending",
   "visible_to_all": true,
   ...
 }
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "reason": [
            "The reason field is required."
        ],
        "from_date": [
            "The from date field is required."
        ],
        "to_date": [
            "The to date field is required."
        ]
    }
}
 

Example response (500):


{
    "error": "Exception message",
    "message": "leave request culd not created",
    "line": 125,
    "file": "app/Http/Controllers/LeaveRequestController.php"
}
 

Request      

POST api/master-panel/leaverequest

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

reason   string   

The reason for the leave. Example: Family function

from_date   date   

The start date of the leave in the format Y-m-d. Example: 2025-06-10

to_date   date   

The end date of the leave in the format Y-m-d. If partialLeave is on, this must match from_date. Example: 2025-06-12

partialLeave   boolean  optional  

optional If set to "on", indicates a partial day leave. Example: true

from_time   string  optional  

required_if:partialLeave,on The start time for a partial leave (24-hour format). Example: 10:00

to_time   string  optional  

required_if:partialLeave,on The end time for a partial leave (24-hour format). Example: 14:00

status   string  optional  

optional Only admins or leave editors can set status to 'approved' or 'rejected'. Default is 'pending'. Example: pending

leaveVisibleToAll   boolean  optional  

optional If set to "on", the leave is visible to all workspace users. Example: true

visible_to_ids   string[]  optional  

optional Required if leaveVisibleToAll is not set. An array of user IDs who can view the leave.

user_id   integer  optional  

optional Only admins or leave editors can create leave requests on behalf of another user. Example: 9

isApi   boolean  optional  

optional Indicates if this is an API request. Defaults to true. Example: true

List Leave Requests (all or by ID) This API returns either a paginated list of leave requests based on filters or a single leave request if an ID is provided. Requires authentication. Workspace must be set via header `workspace-id`.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/master-panel/leaverequest/17?isApi=&search=consequatur&sort=consequatur&order=consequatur&user_ids[]=consequatur&action_by_ids[]=consequatur&types[]=consequatur&statuses[]=consequatur&start_date_from=consequatur&start_date_to=consequatur&end_date_from=consequatur&end_date_to=consequatur&limit=17" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/leaverequest/17"
);

const params = {
    "isApi": "0",
    "search": "consequatur",
    "sort": "consequatur",
    "order": "consequatur",
    "user_ids[0]": "consequatur",
    "action_by_ids[0]": "consequatur",
    "types[0]": "consequatur",
    "statuses[0]": "consequatur",
    "start_date_from": "consequatur",
    "start_date_to": "consequatur",
    "end_date_from": "consequatur",
    "end_date_to": "consequatur",
    "limit": "17",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200, Single Leave Request Found):


{
    "success": true,
    "message": "Leave request retrieved successfully.",
    "data": {
        "total": 1,
        "data": [
            {
                "id": 14,
                "user_name": "John Doe",
                "action_by": "Jane Smith",
                "from_date": "Mon, 2024-06-01",
                "to_date": "Tue, 2024-06-02",
                "type": "Full",
                "duration": "2 days",
                "reason": "Medical leave",
                "status": "<span class='badge bg-warning'>Pending</span>",
                "visible_to": "All",
                "created_at": "2024-05-15 10:30 AM",
                "updated_at": "2024-05-16 09:20 AM",
                "actions": "<a href=...>Edit</a> <button>Delete</button>"
            }
        ]
    }
}
 

Example response (200, List of Leave Requests):


{
    "success": true,
    "message": "Leave requests retrieved successfully.",
    "data": {
        "total": 5,
        "data": [
            {
                "id": 1,
                "user_name": "John Doe",
                "action_by": "Jane Smith",
                "from_date": "Mon, 2024-06-01",
                "to_date": "Tue, 2024-06-02",
                "type": "Full",
                "duration": "2 days",
                "reason": "Annual Leave",
                "status": "<span class='badge bg-success'>Approved</span>",
                "visible_to": "All",
                "created_at": "2024-05-01 08:00 AM",
                "updated_at": "2024-05-02 09:00 AM",
                "actions": "<a href=...>Edit</a> <button>Delete</button>"
            }
        ]
    }
}
 

Example response (404, Leave request not found):


{
    "success": false,
    "message": "Unable to retrieve leave requests.",
    "data": []
}
 

Example response (500, Server error or internal exception):


{
    "success": false,
    "message": "Unable to retrieve leave requests.",
    "data": [],
    "error": "Call to undefined relationship [actionBy] on model [App\\Models\\LeaveRequest]."
}
 

Request      

GET api/master-panel/leaverequest/{id?}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer  optional  

Optional. Leave request ID. If provided, returns only that leave request. Example: 17

Query Parameters

isApi   boolean  optional  

Optional. Set to true for API mode. Default: true Example: false

search   string  optional  

Optional. Search by leave reason or ID. Example: consequatur

sort   string  optional  

Optional. Column to sort by. Default: id Example: consequatur

order   string  optional  

Optional. Sort direction: ASC or DESC. Default: DESC Example: consequatur

user_ids   string[]  optional  

Optional. Filter by one or more user IDs.

action_by_ids   string[]  optional  

Optional. Filter by action_by user IDs.

types   string[]  optional  

Optional. Filter by types: full or partial.

statuses   string[]  optional  

Optional. Filter by status: pending, approved, rejected.

start_date_from   string  optional  

date Optional. Start range for from_date filter. Example: consequatur

start_date_to   string  optional  

date Optional. End range for from_date filter. Example: consequatur

end_date_from   string  optional  

date Optional. Start range for to_date filter. Example: consequatur

end_date_to   string  optional  

date Optional. End range for to_date filter. Example: consequatur

limit   integer  optional  

Optional. Results per page. Default: 10 Example: 17

Update Leave Request

requires authentication

This endpoint allows authorized users to update an existing leave request. Only admins or leave editors can change the status. Team members cannot approve their own leaves. Leave requests already actioned (approved/rejected) can only be modified by an admin.

Example request:
curl --request PUT \
    "http://localhost:8000/api/master-panel/leaverequest/consequatur" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 12,
    \"reason\": \"Family emergency\",
    \"from_date\": \"2025-06-10\",
    \"to_date\": \"2025-06-12\",
    \"from_time\": \"09:00\",
    \"to_time\": \"13:00\",
    \"partialLeave\": \"on\",
    \"leaveVisibleToAll\": \"on\",
    \"visible_to_ids\": [
        2,
        3,
        4
    ],
    \"status\": \"approved\"
}"
const url = new URL(
    "http://localhost:8000/api/master-panel/leaverequest/consequatur"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 12,
    "reason": "Family emergency",
    "from_date": "2025-06-10",
    "to_date": "2025-06-12",
    "from_time": "09:00",
    "to_time": "13:00",
    "partialLeave": "on",
    "leaveVisibleToAll": "on",
    "visible_to_ids": [
        2,
        3,
        4
    ],
    "status": "approved"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Leave request updated successfully.",
    "data": {
        "id": 12,
        "data": {
            "id": 12,
            "user_id": 3,
            "reason": "Family emergency",
            "from_date": "2025-06-10",
            "to_date": "2025-06-12",
            "from_time": "09:00",
            "to_time": "13:00",
            "status": "approved",
            "action_by": 1,
            "visible_to_all": 1,
            "created_at": "2025-06-01T12:30:00.000000Z",
            "updated_at": "2025-06-06T10:45:00.000000Z"
        },
        "type": "leave_request"
    }
}
 

Example response (400):


{
    "error": true,
    "message": "Missing or invalid input.",
    "details": {
        "from_date": [
            "The from date field is required."
        ]
    }
}
 

Example response (403):


{
    "error": true,
    "message": "You cannot approve your own leave request."
}
 

Example response (403):


{
    "error": true,
    "message": "Once actioned only admin can update leave request."
}
 

Example response (403):


{
    "error": true,
    "message": "You cannot set the status to pending if it has already been approved or rejected."
}
 

Example response (422):


{
    "error": true,
    "message": "Validation failed.",
    "details": {
        "status": [
            "The selected status is invalid."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while updating the leave request.",
    "details": "SQLSTATE[23000]: Integrity constraint violation..."
}
 

Request      

PUT api/master-panel/leaverequest/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the leaverequest. Example: consequatur

Body Parameters

id   integer   

The ID of the leave request to update. Example: 12

reason   string   

Reason for leave. Example: Family emergency

from_date   date   

Start date of leave (in Y-m-d format). Must be before or equal to to_date. Example: 2025-06-10

to_date   date   

End date of leave (in Y-m-d format). Example: 2025-06-12

from_time   string  optional  

Optional. Required if partial leave is selected. Format: HH:MM. Example: 09:00

to_time   string  optional  

Optional. Required if partial leave is selected. Format: HH:MM. Example: 13:00

partialLeave   string  optional  

Optional. If "on", indicates it's a partial leave. Example: on

leaveVisibleToAll   string  optional  

Optional. If "on", the leave will be visible to all users. Example: on

visible_to_ids   string[]  optional  

Optional. List of user IDs who can view this leave (if leaveVisibleToAll is not set).

status   string  optional  

optional New status of the leave. Allowed values: pending, approved, rejected. Required if user is admin or leave editor. Example: approved

Delete a leave request by ID.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/master-panel/leaverequest/1" \
    --header "workspace_id: 2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost:8000/api/master-panel/leaverequest/1"
);

const headers = {
    "workspace_id": "2",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "error": false,
    "message": "Leave request deleted successfully.",
    "id": 1,
    "type": "leave_request",
    "data": []
}
 

Example response (404):


{
    "error": true,
    "message": "Leave request not found.",
    "data": []
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the leave request.",
    "data": []
}
 

Request      

DELETE api/master-panel/leaverequest/{id}

Headers

workspace_id      

Example: 2

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the leave request to delete. Example: 1