MENU navbar-image

Introduction

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

Authenticating requests

This API is not authenticated.

Endpoints

Update FCM Token.

This endpoint allows an authenticated user or client to update their FCM token for push notifications.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/user/fcm-token" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"fcm_token\": \"dXkJz7KYZ9o:APA91bGfLa_qwAeD...\"
}"
const url = new URL(
    "http://localhost:8000/api/user/fcm-token"
);

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

let body = {
    "fcm_token": "dXkJz7KYZ9o:APA91bGfLa_qwAeD..."
};

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

Example response (200):


{
    "error": false,
    "message": "FCM token updated successfully."
}
 

Request      

PATCH api/user/fcm-token

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

fcm_token   string   

The new FCM token for push notifications. Example: dXkJz7KYZ9o:APA91bGfLa_qwAeD...

User Authentication

Register a new user.

This endpoint allows a new user to sign up by providing necessary details.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/signup" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"type\": \"member\",
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"password123\",
    \"password_confirmation\": \"password123\",
    \"company\": \"Acme Inc.\",
    \"fcm_token\": \"cXJ1AqT6B...\"
}"
const url = new URL(
    "http://localhost:8000/api/users/signup"
);

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

let body = {
    "type": "member",
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "password": "password123",
    "password_confirmation": "password123",
    "company": "Acme Inc.",
    "fcm_token": "cXJ1AqT6B..."
};

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

Example response (200):


{
"error": false,
"message": "Account created successfully.",
"data": {
"id": 225,
"first_name": "Test",
"last_name": "User",
"role": "admin",
"email": "test.user@example.com",
"phone": null,
"dob": null,
"doj": null,
"address": null,
"city": null,
"state": null,
"country": null,
"zip": null,
"photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg",
"status": 0,
"created_at": "13-08-2024 14:59:38",
"updated_at": "13-08-2024 14:59:38"
"assigned": {
"projects": 0,
"tasks": 0
}
}
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "email": [
            "The email field is required.",
            "The email has already been taken."
        ],
        "password": [
            "The password must be at least 6 characters."
        ],
        "role": [
            "The role field is required."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Account couldn't be created, please contact the admin for assistance."
}
 

Request      

POST api/users/signup

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

type   string   

The type of account ('member' for team member, 'client' for client). Example: member

first_name   string   

The first name of the user. Example: John

last_name   string   

The last name of the user. Example: Doe

email   string   

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

password   string   

The password for the account. Example: password123

password_confirmation   string   

The confirmation of the password. Must match 'password'. Example: password123

company   string  optional  

nullable The company name. Example: Acme Inc.

fcm_token   string  optional  

nullable The optional FCM token for push notifications. Example: cXJ1AqT6B...

Log in an existing user.

This endpoint allows a user to log in by providing their email and password. Upon successful authentication, a token is returned for accessing protected resources.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/login" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\",
    \"password\": \"password123\",
    \"fcm_token\": \"cXJ1AqT6B...\"
}"
const url = new URL(
    "http://localhost:8000/api/users/login"
);

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

let body = {
    "email": "john.doe@example.com",
    "password": "password123",
    "fcm_token": "cXJ1AqT6B..."
};

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

Example response (200):


{
    "error": false,
    "message": "Logged in successfully.",
    "token": "15|ANl9HwfqiiUxdOmNWba5qKhzfk3h1fyi8ZUoYbH8de8d3534",
    "data": {
        "user_id": 7,
        "workspace_id": 6,
        "my_locale": "en",
        "locale": "en"
    }
}
 

Example response (401):


{
    "error": true,
    "message": "Unauthorized"
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ]
    }
}
 

Request      

POST api/users/login

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

email   string   

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

password   string   

The password for the user. Example: password123

fcm_token   string  optional  

nullable The optional FCM token for push notifications. Example: cXJ1AqT6B...

Send Password Reset Link.

This endpoint allows a user or client to request a password reset link by providing their email and account type.

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

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

let body = {
    "email": "john.doe@example.com",
    "account_type": "user"
};

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 (404):


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

Example response (500):


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

Request      

POST api/password/reset-request

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

email   string   

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

account_type   string   

The type of account ('user' for normal users, 'client' for clients). Example: user

Reset Password.

This endpoint allows a user or client to reset their password using a valid token.

Example request:
curl --request POST \
    "http://localhost:8000/api/password/reset" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --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/password/reset"
);

const headers = {
    "Accept": "application/json",
    "workspace_id": "1",
    "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 has been reset successfully."
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Password reset failed. Please try again later."
}
 

Request      

POST api/password/reset

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

token   string   

The password reset token provided via the reset link. Example: abc123

email   string   

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

password   string   

The new password for the account. Must be at least 6 characters and confirmed. Example: newPassword123

password_confirmation   string   

The confirmation of the new password. Must match 'password'. Example: newPassword123

account_type   string   

The type of account ('user' for normal users, 'client' for clients). Example: user

Profile Management

Retrieve the authenticated user's profile.

requires authentication

This endpoint returns the profile information of the currently authenticated user. The user must be authenticated to access their profile details.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/user" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/user"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Profile details retrieved successfully",
    "data": {
        "id": 7,
        "first_name": "Madhavan",
        "last_name": "Vaidya",
        "role": "admin",
        "email": "admin@gmail.com",
        "phone": "9099882203",
        "dob": "17-06-2024",
        "doj": "03-10-2022",
        "address": "Devonshire",
        "city": "Windsor",
        "state": "ON",
        "country": "Canada",
        "zip": "123654",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png",
        "status": 1,
        "created_at": "03-01-2023 10:37:20",
        "updated_at": "13-08-2024 14:16:45",
        "assigned": {
            "projects": 11,
            "tasks": 9
        },
        "is_admin_or_leave_editor": true,
        "is_admin_or_has_all_data_access": true
    }
}
 

Request      

GET api/user

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Update the profile picture of a logged-in user or a specified user/client.

requires authentication

This endpoint allows the authenticated user to update their profile picture. If both id and type are provided, the profile picture for the specified user or client will be updated. If not, the profile picture of the logged-in user will be updated.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/photo" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "id=1"\
    --form "type=user"\
    --form "upload=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php1F83.tmp" 
const url = new URL(
    "http://localhost:8000/api/users/photo"
);

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

const body = new FormData();
body.append('id', '1');
body.append('type', 'user');
body.append('upload', document.querySelector('input[name="upload"]').files[0]);

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

Example response (200):


{
    "error": false,
    "message": "Profile picture updated successfully.",
    "data": {
        "id": 7,
        "first_name": "Madhavan",
        "last_name": "Vaidya",
        "role": "admin",
        "email": "admin@gmail.com",
        "phone": "9099882203",
        "dob": "17-06-2024",
        "doj": "03-10-2022",
        "address": "Devonshire",
        "city": "Windsor",
        "state": "ON",
        "country": "Canada",
        "zip": "123654",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/atEj9NKCeAJhM5VqBN69mFKHntHbZkPUl2Sa22RA.webp",
        "status": 1,
        "created_at": "03-01-2023 10:37:20",
        "updated_at": "13-08-2024 18:58:34",
        "assigned": {
            "projects": 11,
            "tasks": 21
        }
    }
}
 

Example response (200):


{
    "error": true,
    "message": "No profile picture selected!"
}
 

Example response (200):


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

Example response (500):


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

Request      

POST api/users/photo

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

Body Parameters

id   integer   

The ID of the user or client whose profile picture is being updated. Required if type is provided. Example: 1

type   string   

The type of the entity whose profile picture is being updated. Must be either 'user' or 'client'. Example: user

upload   file   

The file of the new profile picture to be uploaded. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php1F83.tmp

Update the profile details of a logged-in user.

requires authentication

This endpoint allows the authenticated user to update their profile details such as name, email, address, and other relevant information.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/2/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"first_name\": \"Madhavan\",
    \"last_name\": \"Vaidya\",
    \"email\": \"admin@gmail.com\",
    \"role\": 1,
    \"phone\": \"9099882203\",
    \"country_code\": \"+91\",
    \"country_iso_code\": \"in\",
    \"dob\": \"17-06-2024\",
    \"doj\": \"03-10-2022\",
    \"address\": \"Devonshire\",
    \"city\": \"Windsor\",
    \"state\": \"ON\",
    \"country\": \"Canada\",
    \"zip\": \"123654\",
    \"password\": \"12345678\",
    \"password_confirmation\": \"12345678\"
}"
const url = new URL(
    "http://localhost:8000/api/users/2/profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "first_name": "Madhavan",
    "last_name": "Vaidya",
    "email": "admin@gmail.com",
    "role": 1,
    "phone": "9099882203",
    "country_code": "+91",
    "country_iso_code": "in",
    "dob": "17-06-2024",
    "doj": "03-10-2022",
    "address": "Devonshire",
    "city": "Windsor",
    "state": "ON",
    "country": "Canada",
    "zip": "123654",
    "password": "12345678",
    "password_confirmation": "12345678"
};

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

Example response (200):


{
    "error": false,
    "message": "Profile details updated successfully.",
    "data": {
        "id": 7,
        "first_name": "Madhavan",
        "last_name": "Vaidya",
        "role": "admin",
        "email": "admin@gmail.com",
        "phone": "9099882203",
        "dob": "17-06-2024",
        "doj": "03-10-2022",
        "address": "Devonshire",
        "city": "Windsor",
        "state": "ON",
        "country": "Canada",
        "zip": "123654",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/atEj9NKCeAJhM5VqBN69mFKHntHbZkPUl2Sa22RA.webp",
        "status": 1,
        "created_at": "03-01-2023 10:37:20",
        "updated_at": "13-08-2024 18:58:34",
        "assigned": {
            "projects": 11,
            "tasks": 21
        }
    }
}
 

Example response (200):


{
    "error": true,
    "message": "Validation error: The email has already been taken."
}
 

Example response (200):


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

Example response (500):


{
  "error": true,
  "message": "Profile details couldn\'t be updated."
}
 

Request      

POST api/users/{id}/profile

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the user whose profile is being updated. Example: 2

Body Parameters

first_name   string   

The user's first name. Example: Madhavan

last_name   string   

The user's last name. Example: Vaidya

email   string   

The user's email address. Can only be edited if is_admin_or_has_all_data_access is true for the logged-in user. Example: admin@gmail.com

role   integer  optional  

The ID of the role for the user. If the authenticated user is an admin, the provided role will be used. If the authenticated user is not an admin, the current role of the user will be used, regardless of the input. Example: 1

phone   string  optional  

The user's phone number. Example: 9099882203

country_code   string  optional  

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

country_iso_code   string  optional  

nullable The ISO code for the phone number. Example: in

dob   date  optional  

The user's date of birth. Example: 17-06-2024

doj   date  optional  

The user's date of joining. Example: 03-10-2022

address   string  optional  

The user's address. Example: Devonshire

city   string  optional  

The user's city. Example: Windsor

state   string  optional  

The user's state. Example: ON

country   string  optional  

The user's country. Example: Canada

zip   string  optional  

The user's zip code. Example: 123654

password   string  optional  

The user's new password (if changing). Example: 12345678

password_confirmation   string  optional  

The password confirmation (if changing password). Example: 12345678

Delete account of a logged-in user.

requires authentication

This endpoint allows the authenticated user to delete their account.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/account/destroy" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/account/destroy"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
  "error": false,
  "message": "Account deleted successfully."
  "data": []
}
 

Example response (404):


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

Example response (500):


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

Request      

DELETE api/account/destroy

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Dashboard Management

List or search users with birthdays today or upcoming.

requires authentication

This endpoint retrieves a list of users with birthdays occurring today or within a specified range of days. The user must be authenticated to perform this action.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/upcoming-birthdays?search=John&order=DESC&upcoming_days=15&user_ids[]=123&user_ids[]=456&limit=10&offset=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/upcoming-birthdays"
);

const params = {
    "search": "John",
    "order": "DESC",
    "upcoming_days": "15",
    "user_ids[0]": "123",
    "user_ids[1]": "456",
    "limit": "10",
    "offset": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Upcoming birthdays retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 1,
            "member": "John Doe",
            "photo": "http://example.com/storage/photos/john_doe.jpg",
            "birthday_count": 30,
            "days_left": 10,
            "dob": "Tue, 2024-08-08"
        }
    ]
}
 

Example response (200):


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

Request      

GET api/upcoming-birthdays

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Query Parameters

search   string  optional  

Optional. The search term to filter users by first name or last name or combination of first name and last name or User ID or date of birth. Example: John

order   string  optional  

Optional. The sort order for the dob column. Acceptable values are ASC or DESC. Default is ASC. Example: DESC

upcoming_days   integer  optional  

Optional. The number of days from today to consider for upcoming birthdays. Default is 30. Example: 15

user_ids   string[]  optional  

Optional. The specific user IDs to filter the results.

limit   integer  optional  

Optional. The number of results to return per page. Default is 15. Example: 10

offset   integer  optional  

Optional. The number of results to skip before starting to collect the result set. Default is 0. Example: 5

List or search users with work anniversaries today or upcoming.

requires authentication

This endpoint retrieves a list of users with work anniversaries occurring today or within a specified range of days. The user must be authenticated to perform this action.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/upcoming-work-anniversaries?search=John&order=DESC&upcoming_days=15&user_ids[]=123&user_ids[]=456&limit=10&offset=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/upcoming-work-anniversaries"
);

const params = {
    "search": "John",
    "order": "DESC",
    "upcoming_days": "15",
    "user_ids[0]": "123",
    "user_ids[1]": "456",
    "limit": "10",
    "offset": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Upcoming work anniversaries retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 1,
            "member": "John Doe",
            "photo": "http://example.com/storage/photos/john_doe.jpg",
            "anniversary_count": 5,
            "days_left": 10,
            "doj": "Tue, 2024-08-08"
        }
    ]
}
 

Example response (200):


{
    "error": true,
    "message": "Upcoming work anniversaries not found.",
    "data": []
}
 

Request      

GET api/upcoming-work-anniversaries

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Query Parameters

search   string  optional  

Optional. The search term to filter users by first name or last name or combination of first name and last name or User ID or date of joining. Example: John

order   string  optional  

Optional. The sort order for the doj column. Acceptable values are ASC or DESC. Default is ASC. Example: DESC

upcoming_days   integer  optional  

Optional. The number of days from today to consider for upcoming work anniversaries. Default is 30. Example: 15

user_ids   string[]  optional  

Optional. The specific user IDs to filter the results.

limit   integer  optional  

Optional. The number of results to return per page. Default is 15. Example: 10

offset   integer  optional  

Optional. The number of results to skip before starting to collect the result set. Default is 0. Example: 5

List members currently on leave or scheduled to be on leave.

requires authentication

This endpoint retrieves a list of members who are currently on leave or scheduled to be on leave within a specified range of days. The user must be authenticated to perform this action.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/members-on-leave?search=John&sort=to_date&order=DESC&upcoming_days=15&user_ids[]=123&user_ids[]=456&limit=10&offset=5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/members-on-leave"
);

const params = {
    "search": "John",
    "sort": "to_date",
    "order": "DESC",
    "upcoming_days": "15",
    "user_ids[0]": "123",
    "user_ids[1]": "456",
    "limit": "10",
    "offset": "5",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Members on leave retrieved successfully.",
    "total": 1,
    "data": [
        {
            "id": 1,
            "member": "John Doe",
            "photo": "http://example.com/storage/photos/john_doe.jpg",
            "from_date": "Mon, 2024-07-15",
            "to_date": "Fri, 2024-07-19",
            "type": "Full",
            "duration": "5 days",
            "days_left": 0
        }
    ]
}
 

Example response (200):


{
    "error": true,
    "message": "Members on leave not found.",
    "data": []
}
 

Request      

GET api/members-on-leave

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Query Parameters

search   string  optional  

Optional. The search term to filter users by first name or last name or combination of first name and last name or User ID or date of joining. Example: John

sort   string  optional  

Optional. The field to sort by. Acceptable values are from_date and to_date. Default is from_date. Example: to_date

order   string  optional  

Optional. The sort order. Acceptable values are ASC or DESC. Default is ASC. Example: DESC

upcoming_days   integer  optional  

Optional. The number of days from today to consider for upcoming leave. Default is 30. Example: 15

user_ids   string[]  optional  

Optional. The specific user IDs to filter the results.

limit   integer  optional  

Optional. The number of results to return per page. Default is 15. Example: 10

offset   integer  optional  

Optional. The number of results to skip before starting to collect the result set. Default is 0. Example: 5

Get Statistics

requires authentication

This endpoint retrieves workspace-specific statistics related to projects, tasks, users, clients, todos, and meetings. The user must be authenticated and have the necessary permissions to manage (if applicable) each respective module.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/dashboard/statistics" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/dashboard/statistics"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Statistics retrieved successfully",
    "data": {
        "total_projects": 8,
        "total_tasks": 8,
        "total_users": 8,
        "total_clients": 8,
        "total_meetings": 8,
        "total_todos": 0,
        "completed_todos": 0,
        "pending_todos": 0,
        "status_wise_projects": [
            {
                "id": 1,
                "title": "In Progress",
                "color": "primary",
                "total_projects": 4
            },
            {
                "id": 2,
                "title": "Completed",
                "color": "success",
                "total_projects": 4
            }
        ],
        "status_wise_tasks": [
            {
                "id": 1,
                "title": "In Progress",
                "color": "primary",
                "total_tasks": 4
            },
            {
                "id": 2,
                "title": "Completed",
                "color": "success",
                "total_tasks": 4
            }
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while retrieving statistics: Internal server error message"
}
 

Request      

GET api/dashboard/statistics

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Project Management

List or search projects.

requires authentication

This endpoint retrieves a list of projects based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, user, client, priority, tag, date ranges, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/projects/1?search=Project&sort=title&order=ASC&status_ids[]=2&status_ids[]=3&user_ids[]=1&user_ids[]=2&user_ids[]=3&client_ids[]=5&client_ids[]=6&priority_ids[]=1&priority_ids[]=2&tag_ids[]=1&tag_ids[]=2&project_start_date_from=2024-01-01&project_start_date_to=2024-12-31&project_end_date_from=2024-01-01&project_end_date_to=2024-12-31&is_favorites=1&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"user_ids\": [
        18
    ],
    \"client_ids\": [
        6
    ],
    \"priority_ids\": [
        14
    ],
    \"tag_ids\": [
        6
    ],
    \"status_ids\": [
        1
    ]
}"
const url = new URL(
    "http://localhost:8000/api/projects/1"
);

const params = {
    "search": "Project",
    "sort": "title",
    "order": "ASC",
    "status_ids[0]": "2",
    "status_ids[1]": "3",
    "user_ids[0]": "1",
    "user_ids[1]": "2",
    "user_ids[2]": "3",
    "client_ids[0]": "5",
    "client_ids[1]": "6",
    "priority_ids[0]": "1",
    "priority_ids[1]": "2",
    "tag_ids[0]": "1",
    "tag_ids[1]": "2",
    "project_start_date_from": "2024-01-01",
    "project_start_date_to": "2024-12-31",
    "project_end_date_from": "2024-01-01",
    "project_end_date_to": "2024-12-31",
    "is_favorites": "1",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "user_ids": [
        18
    ],
    "client_ids": [
        6
    ],
    "priority_ids": [
        14
    ],
    "tag_ids": [
        6
    ],
    "status_ids": [
        1
    ]
};

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

Example response (200):


{
    "error": false,
    "message": "Projects retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 351,
            "title": "rwer",
            "status": "Rel test",
            "priority": "Default",
            "users": [
                {
                    "id": 7,
                    "first_name": "Madhavan",
                    "last_name": "Vaidya",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
                },
                {
                    "id": 183,
                    "first_name": "Girish",
                    "last_name": "Thacker",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
                }
            ],
            "clients": [],
            "tags": [],
            "start_date": "14-06-2024",
            "end_date": "14-06-2024",
            "budget": "",
            "created_at": "14-06-2024 17:50:09",
            "updated_at": "17-06-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/projects/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the project to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter projects by title or id. Example: Project

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, status, priority, start_date, end_date, budget, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status_ids   string[]  optional  

optional An array of status IDs to filter projects by.

user_ids   string[]  optional  

optional An array of user IDs to filter projects by.

client_ids   string[]  optional  

optional An array of client IDs to filter projects by.

priority_ids   string[]  optional  

optional An array of priority IDs to filter projects by.

tag_ids   string[]  optional  

optional An array of tag IDs to filter projects by.

project_start_date_from   string  optional  

optional The start date range's start in YYYY-MM-DD format. Example: 2024-01-01

project_start_date_to   string  optional  

optional The start date range's end in YYYY-MM-DD format. Example: 2024-12-31

project_end_date_from   string  optional  

optional The end date range's start in YYYY-MM-DD format. Example: 2024-01-01

project_end_date_to   string  optional  

optional The end date range's end in YYYY-MM-DD format. Example: 2024-12-31

is_favorites   boolean  optional  

optional Filter projects marked as favorites. Example: true

limit   integer  optional  

optional The number of projects per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Body Parameters

user_ids   integer[]  optional  
client_ids   integer[]  optional  
priority_ids   integer[]  optional  
tag_ids   integer[]  optional  
status_ids   integer[]  optional  

Create a new project.

requires authentication

This endpoint creates a new project with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title, status, priority, dates, and task accessibility.

Example request:
curl --request POST \
    "http://localhost:8000/api/projects/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"New Website Launch\",
    \"status_id\": 1,
    \"priority_id\": 2,
    \"start_date\": \"2024-08-01\",
    \"end_date\": \"2024-08-31\",
    \"budget\": \"5000.00\",
    \"task_accessibility\": \"project_users\",
    \"description\": \"A project to launch a new company website.\",
    \"note\": \"Ensure all team members are informed.\",
    \"user_id\": \"[1, 2, 3]\",
    \"client_id\": \"[5, 6]\",
    \"tag_ids\": \"[10, 11]\",
    \"clientCanDiscuss\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/projects/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "New Website Launch",
    "status_id": 1,
    "priority_id": 2,
    "start_date": "2024-08-01",
    "end_date": "2024-08-31",
    "budget": "5000.00",
    "task_accessibility": "project_users",
    "description": "A project to launch a new company website.",
    "note": "Ensure all team members are informed.",
    "user_id": "[1, 2, 3]",
    "client_id": "[5, 6]",
    "tag_ids": "[10, 11]",
    "clientCanDiscuss": "on"
};

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

Example response (200):


{
    "error": false,
    "message": "Project created successfully.",
    "id": 438,
    "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"
            },
            {
                "id": 185,
                "first_name": "Admin",
                "last_name": "Test",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "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",
        "task_accessibility": "assigned_users",
        "description": null,
        "note": null,
        "favorite": 0,
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 14:38:51"
    }
}
 

Example response (200):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "status_id": [
            "The status_id field is required."
        ],
        "start_date": [
            "The start date must be before or equal to the end date."
        ],
        "budget": [
            "The budget format is invalid."
        ],
        "task_accessibility": [
            "The task accessibility must be either project_users or assigned_users."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/projects/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the project. Example: New Website Launch

status_id   integer   

The ID of the project's status. Example: 1

priority_id   integer  optional  

optional The ID of the project's priority. Example: 2

start_date   string|null  optional  

optional The start date of the project in the format specified in the general settings. Example: 2024-08-01

end_date   string|null  optional  

optional The end date of the project in the format specified in the general settings. Example: 2024-08-31

budget   string|null  optional  

optional Only digits, commas as thousand separators, and a single decimal point are allowed. digits can optionally be grouped in thousands with commas, where each group of digits must be exactly three digits long (e.g., 1,000 is correct; 10,0000 is not). Example: 5000.00

task_accessibility   string   

Indicates who can access the task. Must be either 'project_users' or 'assigned_users'. Example: project_users

description   string|null  optional  

optional A description of the project. Example: A project to launch a new company website.

note   string|null  optional  

optional Additional notes for the project. Example: Ensure all team members are informed.

user_id   array|null  optional  

optional Array of user IDs to be associated with the project. Example: [1, 2, 3]

client_id   array|null  optional  

optional Array of client IDs to be associated with the project. Example: [5, 6]

tag_ids   array|null  optional  

optional Array of tag IDs to be associated with the project. Example: [10, 11]

clientCanDiscuss   string  optional  

optional Indicates if the client can participate in project discussions. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user; otherwise, it will be considered 0 by default. The value should be 'on' to allow client participation. Example: on

Update an existing project.

requires authentication

This endpoint updates an existing project with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title, status, priority, dates, and task accessibility.

Example request:
curl --request POST \
    "http://localhost:8000/api/projects/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 1,
    \"title\": \"Updated Project Title\",
    \"status_id\": 2,
    \"priority_id\": 3,
    \"budget\": \"5000.00\",
    \"task_accessibility\": \"assigned_users\",
    \"start_date\": \"2024-08-01\",
    \"end_date\": \"2024-08-31\",
    \"description\": \"Updated project description.\",
    \"note\": \"Updated note for the project.\",
    \"user_id\": \"[2, 3]\",
    \"client_id\": \"[5, 6]\",
    \"tag_ids\": \"[10, 11]\",
    \"clientCanDiscuss\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/projects/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 1,
    "title": "Updated Project Title",
    "status_id": 2,
    "priority_id": 3,
    "budget": "5000.00",
    "task_accessibility": "assigned_users",
    "start_date": "2024-08-01",
    "end_date": "2024-08-31",
    "description": "Updated project description.",
    "note": "Updated note for the project.",
    "user_id": "[2, 3]",
    "client_id": "[5, 6]",
    "tag_ids": "[10, 11]",
    "clientCanDiscuss": "on"
};

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

Example response (200):


{
    "error": false,
    "message": "Project updated successfully.",
    "id": 438,
    "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"
            },
            {
                "id": 185,
                "first_name": "Admin",
                "last_name": "Test",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "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",
        "task_accessibility": "assigned_users",
        "description": null,
        "note": null,
        "favorite": 0,
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 14:38:51"
    }
}
 

Example response (200):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The project ID is required.",
            "The project ID does not exist in our records."
        ],
        "status_id": [
            "The status field is required."
        ],
        "budget": [
            "The budget format is invalid."
        ],
        "task_accessibility": [
            "The task accessibility must be either project_users or assigned_users."
        ],
        "start_date": [
            "The start date must be before or equal to the end date."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/projects/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the project to update. Example: 1

title   string   

The title of the project. Example: Updated Project Title

status_id   integer   

The ID of the project's status. Example: 2

priority_id   integer  optional  

optional The ID of the project's priority. Example: 3

budget   string|null  optional  

optional Only digits, commas as thousand separators, and a single decimal point are allowed. digits can optionally be grouped in thousands with commas, where each group of digits must be exactly three digits long (e.g., 1,000 is correct; 10,0000 is not). Example: 5000.00

task_accessibility   string   

Indicates who can access the task. Must be either 'project_users' or 'assigned_users'. Example: assigned_users

start_date   string|null  optional  

optional The start date of the project in the format specified in the general settings. Example: 2024-08-01

end_date   string|null  optional  

optional The end date of the project in the format specified in the general settings. Example: 2024-08-31

description   string|null  optional  

optional A description of the project. Example: Updated project description.

note   string|null  optional  

optional Additional notes for the project. Example: Updated note for the project.

user_id   array|null  optional  

optional Array of user IDs to be associated with the project. Example: [2, 3]

client_id   array|null  optional  

optional Array of client IDs to be associated with the project. Example: [5, 6]

tag_ids   array|null  optional  

optional Array of tag IDs to be associated with the project. Example: [10, 11]

clientCanDiscuss   string  optional  

optional Indicates if the client can participate in project discussions. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user; otherwise, it will be considered current value by default. The value should be 'on' to allow client participation. Example: on

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 PATCH \
    "http://localhost:8000/api/projects/8/favorite" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_favorite\": 5
}"
const url = new URL(
    "http://localhost:8000/api/projects/8/favorite"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "is_favorite": 5
};

fetch(url, {
    method: "PATCH",
    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      

PATCH api/projects/{id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project to update. Example: 8

Body Parameters

is_favorite   integer   

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

Update the pinned status of a project.

requires authentication

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

Example request:
curl --request PATCH \
    "http://localhost:8000/api/projects/1/pinned" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_pinned\": 11
}"
const url = new URL(
    "http://localhost:8000/api/projects/1/pinned"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "is_pinned": 11
};

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

Example response (200):


{
"error": false,
"message": "Project pinned status updated successfully",
"data": {
  "id": 438,
  "title": "Res Test"
  // Other project details will be included in the actual response
}
}
 

Example response (200):


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

Example response (422):


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

Example response (500):


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

Request      

PATCH api/projects/{id}/pinned

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project to update. Example: 1

Body Parameters

is_pinned   integer   

Indicates whether the project is pinned. Use 1 for true and 0 for false. Example: 11

Update the status of a project.

requires authentication

This endpoint updates the status of a specified project. The user must be authenticated and have permission to set the new status. A notification will be sent to all users and clients associated with the project.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/projects/15/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"statusId\": 6,
    \"note\": \"veniam\"
}"
const url = new URL(
    "http://localhost:8000/api/projects/15/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "statusId": 6,
    "note": "veniam"
};

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

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": "438",
    "type": "project",
    "activity_message": "Madhavan Vaidya updated project status from Default to vbnvbnvbn",
    "data": {
        "id": 438,
        "title": "Res Test",
        "status": "vbnvbnvbn",
        "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:49:33"
    }
}
 

Example response (200):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "statusId": [
            "The selected status id is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/projects/{id}/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project whose status is to be updated. Example: 15

Body Parameters

statusId   integer   

The ID of the new status to set for the project. Example: 6

note   string  optional  

optional An optional note to attach to the project update. Example: veniam

Update the priority of a project.

requires authentication

This endpoint updates the priority of a specified project. The user must be authenticated and have permission to set the new priority.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/projects/19/priority" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"priorityId\": 6
}"
const url = new URL(
    "http://localhost:8000/api/projects/19/priority"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "priorityId": 6
};

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

Example response (200):


{
    "error": false,
    "message": "Priority updated successfully.",
    "id": "438",
    "type": "project",
    "activity_message": "Madhavan Vaidya updated project priority from Low to Medium",
    "data": {
        "id": 438,
        "title": "Res Test",
        "status": "Test From Pro",
        "priority": "Medium",
        "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:58:55"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "priorityId": [
            "The selected priority id is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/projects/{id}/priority

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the project whose priority is to be updated. Example: 19

Body Parameters

priorityId   integer   

The ID of the new priority to set for the project. Example: 6

Remove the specified project.

requires authentication

This endpoint deletes a project based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/projects/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Project deleted successfully.",
    "id": 1,
    "title": "Project Title",
    "data": []
}
 

Example response (200):


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

Example response (500):


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

Request      

DELETE api/projects/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the project to be deleted. Example: 1

Get project status timeline.

requires authentication

This endpoint retrieves the status change history of a project, sorted in descending order.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/projects/6/status-timelines" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/6/status-timelines"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Status timeline retrieved successfully.",
    "status_timeline": [
        {
            "id": 1,
            "status": "In Progress",
            "previous_status": "Pending",
            "new_color": "#ffcc00",
            "old_color": "#cccccc",
            "changed_at": "2025-03-03 14:00:00"
        },
        {
            "id": 2,
            "status": "Completed",
            "previous_status": "In Progress",
            "new_color": "#00cc66",
            "old_color": "#ffcc00",
            "changed_at": "2025-03-05 16:00:00"
        }
    ]
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Could not retrieve status timeline."
}
 

Request      

GET api/projects/{id}/status-timelines

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the project whose status timeline is to be retrieved. Example: 6

Milestone Management

Store a new milestone.

requires authentication

This endpoint creates a new milestone for a specified project. The user must be authenticated and have permission to create milestones.

Example request:
curl --request POST \
    "http://localhost:8000/api/milestones/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"project_id\": 13,
    \"title\": \"pariatur\",
    \"status\": \"aut\",
    \"start_date\": \"delectus\",
    \"end_date\": \"aut\",
    \"cost\": \"eveniet\",
    \"description\": \"Ut quia velit incidunt iste.\"
}"
const url = new URL(
    "http://localhost:8000/api/milestones/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "project_id": 13,
    "title": "pariatur",
    "status": "aut",
    "start_date": "delectus",
    "end_date": "aut",
    "cost": "eveniet",
    "description": "Ut quia velit incidunt iste."
};

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

Example response (200):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "project_id": [
            "The selected project_id is invalid."
        ],
        "title": [
            "The title field is required."
        ],
        "cost": [
            "The cost format is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/milestones/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

project_id   integer   

The ID of the project to which the milestone belongs. Example: 13

title   string   

The title of the milestone. Example: pariatur

status   string   

The status of the milestone. Example: aut

start_date   date  optional  

optional The start date of the milestone (YYYY-MM-DD). Example: delectus

end_date   date  optional  

optional The end date of the milestone (YYYY-MM-DD). Example: aut

cost   numeric   

The cost of the milestone. Example: eveniet

description   string  optional  

optional A description of the milestone. Example: Ut quia velit incidunt iste.

Get a list of milestones for a project.

requires authentication

This endpoint retrieves all milestones associated with a given project. It supports searching, filtering, and sorting functionalities.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/milestones/3?search=quia&sort=non&order=ea&statuses[]=quas&date_between_from=distinctio&date_between_to=odio&start_date_from=nihil&start_date_to=nobis&end_date_from=fuga&end_date_to=ducimus&limit=11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/milestones/3"
);

const params = {
    "search": "quia",
    "sort": "non",
    "order": "ea",
    "statuses[0]": "quas",
    "date_between_from": "distinctio",
    "date_between_to": "odio",
    "start_date_from": "nihil",
    "start_date_to": "nobis",
    "end_date_from": "fuga",
    "end_date_to": "ducimus",
    "limit": "11",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "rows": [
        {
            "id": 12,
            "title": "Design Phase",
            "status": "<span class=\"badge bg-success\">Complete</span>",
            "progress": "<div class=\"progress\"><div class=\"progress-bar\" role=\"progressbar\" style=\"width: 75%\"></div></div><h6 class=\"mt-2\">75%</h6>",
            "cost": "₹1,500.00",
            "start_date": "2025-03-10",
            "end_date": "2025-03-20",
            "created_by": "<a href=\"/users/7\">John Doe</a>",
            "description": "Initial design phase for the project.",
            "created_at": "2025-03-01 14:00:00",
            "updated_at": "2025-03-05 16:00:00",
            "actions": "<a href=\"#\" class=\"edit-milestone\" data-id=\"12\"><i class=\"bx bx-edit\"></i></a>"
        }
    ],
    "total": 1
}
 

Example response (404):


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

Request      

GET api/milestones/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the project whose milestones are to be retrieved. Example: 3

Query Parameters

search   string  optional  

optional Search for milestones by title, ID, cost, or description. Example: quia

sort   string  optional  

optional Field to sort by (default: "id"). Example: non

order   string  optional  

optional Sorting order (ASC/DESC, default: "DESC"). Example: ea

statuses   string[]  optional  

optional Filter by milestone statuses.

date_between_from   string  optional  

date optional Filter milestones starting from this date. Example: distinctio

date_between_to   string  optional  

date optional Filter milestones ending at this date. Example: odio

start_date_from   string  optional  

date optional Filter milestones with a start date after this date. Example: nihil

start_date_to   string  optional  

date optional Filter milestones with a start date before this date. Example: nobis

end_date_from   string  optional  

date optional Filter milestones with an end date after this date. Example: fuga

end_date_to   string  optional  

date optional Filter milestones with an end date before this date. Example: ducimus

limit   integer  optional  

optional Number of records per page. Example: 11

Get details of a specific milestone.

requires authentication

This endpoint retrieves details of a specific milestone by its ID.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/milestones/get/14" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/milestones/get/14"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "milestone": {
        "id": 12,
        "title": "Design Phase",
        "status": "In Progress",
        "cost": "₹1,500.00",
        "start_date": "2025-03-10",
        "end_date": "2025-03-20",
        "description": "Initial design phase for the project.",
        "created_at": "2025-03-01 14:00:00",
        "updated_at": "2025-03-05 16:00:00"
    }
}
 

Example response (404):


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

Request      

GET api/milestones/get/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the milestone to retrieve. Example: 14

Update an existing milestone.

requires authentication

This endpoint updates a specified milestone. The user must be authenticated and have permission to modify the milestone.

Example request:
curl --request POST \
    "http://localhost:8000/api/milestones/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"et\",
    \"status\": \"voluptatum\",
    \"start_date\": \"quibusdam\",
    \"end_date\": \"illum\",
    \"cost\": \"in\",
    \"progress\": 8,
    \"description\": \"Qui veniam et et aliquam nulla.\"
}"
const url = new URL(
    "http://localhost:8000/api/milestones/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "et",
    "status": "voluptatum",
    "start_date": "quibusdam",
    "end_date": "illum",
    "cost": "in",
    "progress": 8,
    "description": "Qui veniam et et aliquam nulla."
};

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

Example response (200):


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

Example response (404):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "cost": [
            "The cost format is invalid."
        ],
        "progress": [
            "The progress field is required."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/milestones/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the milestone to be updated. Example: 20

Body Parameters

title   string   

The updated title of the milestone. Example: et

status   string   

The updated status of the milestone. Example: voluptatum

start_date   date  optional  

optional The updated start date of the milestone (YYYY-MM-DD). Example: quibusdam

end_date   date  optional  

optional The updated end date of the milestone (YYYY-MM-DD). Example: illum

cost   numeric   

The updated cost of the milestone. Example: in

progress   integer   

The updated progress percentage of the milestone. Example: 8

description   string  optional  

optional An updated description of the milestone. Example: Qui veniam et et aliquam nulla.

Delete a milestone.

requires authentication

This endpoint deletes a specified milestone. The user must be authenticated and have permission to delete milestones.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/milestones/destroy/7" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/milestones/destroy/7"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Milestone deleted successfully.",
    "id": 12,
    "title": "Design Phase",
    "type": "milestone",
    "parent_type": "project",
    "parent_id": 438
}
 

Example response (404):


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

Example response (500):


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

Request      

DELETE api/milestones/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the milestone to delete. Example: 7

Project Comments

Add a comment.

requires authentication

This endpoint allows authenticated users to add comments to a specific model (e.g., tasks, projects). Users can also attach files and mention other users.

Example request:
curl --request POST \
    "http://localhost:8000/api/projects/8/comments" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "model_type=qui"\
    --form "model_id=5"\
    --form "content=et"\
    --form "parent_id=14"\
    --form "attachments[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php244C.tmp" 
const url = new URL(
    "http://localhost:8000/api/projects/8/comments"
);

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

const body = new FormData();
body.append('model_type', 'qui');
body.append('model_id', '5');
body.append('content', 'et');
body.append('parent_id', '14');
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": 45,
    "commentable_type": "App\Models\Project",
    "commentable_id": 438,
    "content": "This is a sample comment with a mention @JohnDoe",
    "commenter_id": 7,
    "commenter_type": "App\\Models\\User",
    "parent_id": null,
    "created_at": "2 minutes ago",
    "attachments": [
      {
        "id": 1,
        "file_name": "document.pdf",
        "file_path": "comment_attachments/document.pdf",
        "file_type": "application/pdf"
      }
    ]
  },
  "user": {
    "id": 7,
    "name": "John Doe"
  }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation errors occurred",
    "errors": {
        "content": [
            "Please enter a comment."
        ]
    }
}
 

Example response (500):


{
    "success": false,
    "message": "Comment could not be added."
}
 

Request      

POST api/projects/{id}/comments

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

URL Parameters

id   integer   

The ID of the project to add a comment to. Example: 8

Body Parameters

model_type   string   

The type of model being commented on (e.g., "Task", "Project"). Example: qui

model_id   integer   

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

content   string   

The comment text. Example: et

parent_id   integer  optional  

optional The ID of the parent comment (for replies). Example: 14

attachments[]   file  optional  

optional An array of files to attach to the comment. Maximum file size is defined in the config. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php244C.tmp

Get details of a specific comment.

requires authentication

This endpoint retrieves details of a specific comment by its ID, including any attachments.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/projects/comments/get/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/comments/get/3"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "comment": {
        "id": 45,
        "commentable_type": "App\\Models\\Project",
        "commentable_id": 438,
        "content": "This is a sample comment with a mention @JohnDoe",
        "commenter_id": 7,
        "commenter_type": "App\\Models\\User",
        "parent_id": null,
        "created_at": "2025-03-03 14:00:00",
        "updated_at": "2025-03-03 16:00:00",
        "attachments": [
            {
                "id": 1,
                "file_name": "document.pdf",
                "file_path": "comment_attachments/document.pdf",
                "file_type": "application/pdf"
            }
        ]
    }
}
 

Example response (404):


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

Request      

GET api/projects/comments/get/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the comment to retrieve. Example: 3

Update a comment.

requires authentication

This endpoint updates a specified comment. The user must be authenticated and have permission to modify the comment.

Example request:
curl --request POST \
    "http://localhost:8000/api/projects/comments/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"comment_id\": 6,
    \"content\": \"numquam\"
}"
const url = new URL(
    "http://localhost:8000/api/projects/comments/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "comment_id": 6,
    "content": "numquam"
};

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

Example response (200):


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

Example response (404):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "content": [
            "Please enter a comment."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/projects/comments/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

comment_id   integer   

The ID of the comment to be updated. Example: 6

content   string   

The updated content of the comment. Example: numquam

Delete a comment.

requires authentication

This endpoint deletes a specified comment and removes its attachments from storage. The user must be authenticated and have permission to delete comments.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/projects/comments/destroy?comment_id=12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/comments/destroy"
);

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

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


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

Example response (404):


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

Example response (422):


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

Example response (500):


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

Request      

DELETE api/projects/comments/destroy

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Query Parameters

comment_id   integer   

The ID of the comment to delete. Example: 12

Project Media

Upload media files to a project.

requires authentication

This endpoint allows authenticated users to upload media files related to a project.

Example request:
curl --request POST \
    "http://localhost:8000/api/projects/upload-media" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "id=19"\
    --form "media_files[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php248B.tmp" 
const url = new URL(
    "http://localhost:8000/api/projects/upload-media"
);

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

const body = new FormData();
body.append('id', '19');
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": "File(s) uploaded successfully.",
    "id": [
        101,
        102
    ],
    "type": "media",
    "parent_type": "project",
    "parent_id": 438
}
 

Example response (404):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "media_files": [
            "The media file size exceeds the limit."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred during file upload."
}
 

Request      

POST api/projects/upload-media

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

Body Parameters

id   integer   

The ID of the project to which media files are being uploaded. Example: 19

media_files[]   file   

An array of media files to be uploaded. Maximum file size is defined in the config. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php248B.tmp

Get project media files.

requires authentication

This endpoint retrieves all media files associated with a specific project, including sorting and search capabilities.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/projects/get-media/20?search=tenetur&sort=rerum&order=magnam" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/get-media/20"
);

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

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Media files retrieved successfully.",
    "rows": [
        {
            "id": 101,
            "file": "<a href='https://example.com/storage/project-media/image.jpg' data-lightbox='project-media'><img src='https://example.com/storage/project-media/image.jpg' alt='image.jpg' width='50'></a>",
            "file_name": "image.jpg",
            "file_size": "2 MB",
            "created_at": "2025-03-03 14:00:00",
            "updated_at": "2025-03-03 16:00:00",
            "actions": "<a href='https://example.com/storage/project-media/image.jpg' title='Download' download><i class='bx bx-download bx-sm'></i></a>"
        }
    ],
    "total": 1
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Could not retrieve media files."
}
 

Request      

GET api/projects/get-media/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the project whose media files are to be retrieved. Example: 20

Query Parameters

search   string  optional  

optional A search query to filter media files by name, ID, or upload date. Example: tenetur

sort   string  optional  

optional The column to sort by (default: "id"). Example: rerum

order   string  optional  

optional The sorting order: "ASC" or "DESC" (default: "DESC"). Example: magnam

Delete a media file.

requires authentication

This endpoint deletes a specified media file associated with a project. The user must be authenticated and have permission to delete media files.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/projects/delete-media/facere" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/projects/delete-media/facere"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


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

Example response (404):


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

Example response (500):


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

Request      

DELETE api/projects/delete-media/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   string   

The ID of the delete medium. Example: facere

mediaId   integer   

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

Task Management

Create a new task.

requires authentication

This endpoint creates a new task with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title, status, priority, start and due dates, project association, and optional notes.

Example request:
curl --request POST \
    "http://localhost:8000/api/tasks/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"New Task\",
    \"status_id\": 1,
    \"priority_id\": 2,
    \"start_date\": \"2024-07-20\",
    \"due_date\": \"2024-08-20\",
    \"description\": \"This is a detailed description of the task.\",
    \"project\": 10,
    \"note\": \"Urgent\",
    \"user_id\": [
        1,
        2,
        3
    ],
    \"clientCanDiscuss\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/tasks/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "New Task",
    "status_id": 1,
    "priority_id": 2,
    "start_date": "2024-07-20",
    "due_date": "2024-08-20",
    "description": "This is a detailed description of the task.",
    "project": 10,
    "note": "Urgent",
    "user_id": [
        1,
        2,
        3
    ],
    "clientCanDiscuss": "on"
};

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

Example response (200):


{
    "error": false,
    "message": "Task created successfully.",
    "id": 280,
    "parent_id": "420",
    "parent_type": "project",
    "data": {
        "id": 280,
        "workspace_id": 6,
        "title": "Res Test",
        "status": "Default",
        "status_id": "0",
        "priority": "Default",
        "priority_id": "0",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "user_id": [
            1,
            2
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "start_date": "07-08-2024",
        "due_date": "07-08-2024",
        "project": {
            "id": 420,
            "title": "Updated Project Title"
        },
        "description": "Test Desc",
        "note": "Test Note",
        "created_at": "07-08-2024 13:02:52",
        "updated_at": "07-08-2024 13:02:52"
    }
}
 

Example response (422):


{
 "error": true,
 "message": "Validation errors occurred",
 "errors": {
   "title": ["The title field is required."],
   "status_id": ["The selected status_id is invalid."],
   ...
 }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the task."
}
 

Request      

POST api/tasks/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the task. Example: New Task

status_id   integer   

The status of the task. Must exist in the statuses table. Example: 1

priority_id   integer  optional  

nullable The priority of the task. Must exist in the priorities table. Example: 2

start_date   string|null  optional  

optional The start date of the task in the format specified in the general settings. Example: 2024-07-20

due_date   string|null  optional  

optional The due date of the task in the format specified in the general settings. Example: 2024-08-20

description   string  optional  

nullable A description of the task. Example: This is a detailed description of the task.

project   integer   

The ID of the project associated with the task. Must exist in the projects table. Example: 10

note   string  optional  

nullable Additional notes about the task. Example: Urgent

user_id   string[]  optional  

nullable An array of user IDs to be assigned to the task.

clientCanDiscuss   string  optional  

optional Indicates if the client can participate in task discussions. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user; otherwise, it will be considered 0 by default. The value should be 'on' to allow client participation. Example: on

List or search tasks.

requires authentication

This endpoint retrieves a list of tasks based on various filters. The user must be authenticated to perform this action. The request allows filtering by multiple statuses, users, clients, projects, date ranges, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/tasks/1?search=Task&sort=title&order=ASC&status_ids[]=2&status_ids[]=3&user_ids[]=1&user_ids[]=2&user_ids[]=3&client_ids[]=5&client_ids[]=6&priority_ids[]=1&priority_ids[]=2&project_ids[]=1&project_ids[]=2&task_start_date_from=2024-01-01&task_start_date_to=2024-12-31&task_end_date_from=2024-01-01&task_end_date_to=2024-12-31&is_favorites=1&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"user_ids\": [
        5
    ],
    \"client_ids\": [
        4
    ],
    \"priority_ids\": [
        19
    ],
    \"project_ids\": [
        11
    ],
    \"status_ids\": [
        13
    ]
}"
const url = new URL(
    "http://localhost:8000/api/tasks/1"
);

const params = {
    "search": "Task",
    "sort": "title",
    "order": "ASC",
    "status_ids[0]": "2",
    "status_ids[1]": "3",
    "user_ids[0]": "1",
    "user_ids[1]": "2",
    "user_ids[2]": "3",
    "client_ids[0]": "5",
    "client_ids[1]": "6",
    "priority_ids[0]": "1",
    "priority_ids[1]": "2",
    "project_ids[0]": "1",
    "project_ids[1]": "2",
    "task_start_date_from": "2024-01-01",
    "task_start_date_to": "2024-12-31",
    "task_end_date_from": "2024-01-01",
    "task_end_date_to": "2024-12-31",
    "is_favorites": "1",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "user_ids": [
        5
    ],
    "client_ids": [
        4
    ],
    "priority_ids": [
        19
    ],
    "project_ids": [
        11
    ],
    "status_ids": [
        13
    ]
};

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

Example response (200):


{
    "error": false,
    "message": "Tasks retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 268,
            "workspace_id": 6,
            "title": "sdff",
            "status": "Default",
            "priority": "Default",
            "users": [
                {
                    "id": 7,
                    "first_name": "Madhavan",
                    "last_name": "Vaidya",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
                }
            ],
            "clients": [
                {
                    "id": 102,
                    "first_name": "Test",
                    "last_name": "Client",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
                }
            ],
            "start_date": "23-07-2024",
            "due_date": "24-07-2024",
            "project": {
                "id": 379,
                "title": "From API"
            },
            "description": "<p>Test Desc</p>",
            "note": "Test note",
            "created_at": "23-07-2024 17:50:09",
            "updated_at": "23-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/tasks/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer  optional  

optional The ID of the task to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter tasks by title or id. Example: Task

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, project, status, priority, start_date, due_date, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status_ids   string[]  optional  

optional An array of status IDs to filter tasks by.

user_ids   string[]  optional  

optional An array of user IDs to filter tasks by.

client_ids   string[]  optional  

optional An array of client IDs to filter tasks by.

priority_ids   string[]  optional  

optional An array of priority IDs to filter tasks by.

project_ids   string[]  optional  

optional An array of project IDs to filter tasks by.

task_start_date_from   string  optional  

optional The start date range's start in YYYY-MM-DD format. Example: 2024-01-01

task_start_date_to   string  optional  

optional The start date range's end in YYYY-MM-DD format. Example: 2024-12-31

task_end_date_from   string  optional  

optional The end date range's start in YYYY-MM-DD format. Example: 2024-01-01

task_end_date_to   string  optional  

optional The end date range's end in YYYY-MM-DD format. Example: 2024-12-31

is_favorites   boolean  optional  

optional Filter projects marked as favorites. Example: true

limit   integer  optional  

optional The number of tasks per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Body Parameters

user_ids   integer[]  optional  
client_ids   integer[]  optional  
priority_ids   integer[]  optional  
project_ids   integer[]  optional  
status_ids   integer[]  optional  

Update an existing task.

requires authentication

This endpoint updates the details of an existing task. The user must be authenticated to perform this action. The request validates various fields including title, status, priority, start and due dates, and optional notes. It also handles user assignments and notifies relevant parties of any status changes.

Example request:
curl --request POST \
    "http://localhost:8000/api/tasks/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 267,
    \"title\": \"Updated Task\",
    \"status_id\": 2,
    \"priority_id\": 1,
    \"start_date\": \"2024-07-20\",
    \"due_date\": \"2024-08-20\",
    \"description\": \"Updated task description.\",
    \"note\": \"Needs immediate attention.\",
    \"user_id\": [
        2,
        3
    ],
    \"clientCanDiscuss\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/tasks/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 267,
    "title": "Updated Task",
    "status_id": 2,
    "priority_id": 1,
    "start_date": "2024-07-20",
    "due_date": "2024-08-20",
    "description": "Updated task description.",
    "note": "Needs immediate attention.",
    "user_id": [
        2,
        3
    ],
    "clientCanDiscuss": "on"
};

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

Example response (200):


{
    "error": false,
    "message": "Task updated successfully.",
    "id": 280,
    "parent_id": "420",
    "parent_type": "project",
    "data": {
        "id": 280,
        "workspace_id": 6,
        "title": "Res Test",
        "status": "Default",
        "priority": "Default",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "start_date": "07-08-2024",
        "due_date": "07-08-2024",
        "project": {
            "id": 420,
            "title": "Updated Project Title"
        },
        "description": "Test Desc",
        "note": "Test Note",
        "created_at": "07-08-2024 13:02:52",
        "updated_at": "07-08-2024 13:02:52"
    }
}
 

Example response (422):


{
 "error": true,
 "message": "Validation errors occurred",
 "errors": {
   "id": ["The selected id is invalid."],
   "title": ["The title field is required."],
   "status_id": ["The selected status_id is invalid."],
   ...
 }
}
 

Example response (500):


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

Request      

POST api/tasks/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the task to be updated. Must exist in the tasks table. Example: 267

title   string   

The title of the task. Example: Updated Task

status_id   integer   

The status of the task. Must exist in the statuses table. Example: 2

priority_id   integer  optional  

nullable The priority of the task. Must exist in the priorities table. Example: 1

start_date   string|null  optional  

optional The start date of the task in the format specified in the general settings. Example: 2024-07-20

due_date   string|null  optional  

optional The due date of the task in the format specified in the general settings. Example: 2024-08-20

description   string  optional  

nullable A description of the task. Example: Updated task description.

note   string  optional  

nullable Additional notes about the task. Example: Needs immediate attention.

user_id   string[]  optional  

nullable An array of user IDs to be assigned to the task.

clientCanDiscuss   string  optional  

optional Indicates if the client can participate in task discussions. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user; otherwise, it will be considered current value by default. The value should be 'on' to allow client participation. Example: on

Update the favorite status of a task.

requires authentication

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

Example request:
curl --request PATCH \
    "http://localhost:8000/api/tasks/20/favorite" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_favorite\": 3
}"
const url = new URL(
    "http://localhost:8000/api/tasks/20/favorite"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "is_favorite": 3
};

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

Example response (200):


{
"error": false,
"message": "Task favorite status updated successfully",
"data": {
  "id": 438,
  "title": "Task Example"
  // Other task details will be included in the actual response
}
}
 

Example response (200):


{
    "error": true,
    "message": "Task 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      

PATCH api/tasks/{id}/favorite

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the task to update. Example: 20

Body Parameters

is_favorite   integer   

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

Update the pinned status of a task.

requires authentication

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

Example request:
curl --request PATCH \
    "http://localhost:8000/api/tasks/3/pinned" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_pinned\": 14
}"
const url = new URL(
    "http://localhost:8000/api/tasks/3/pinned"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "is_pinned": 14
};

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

Example response (200):


{
"error": false,
"message": "Task pinned status updated successfully",
"data": {
  "id": 438,
  "title": "Task Example"
  // Other task details will be included in the actual response
}
}
 

Example response (200):


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

Example response (422):


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

Example response (500):


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

Request      

PATCH api/tasks/{id}/pinned

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the task to update. Example: 3

Body Parameters

is_pinned   integer   

Indicates whether the task is pinned. Use 1 for true and 0 for false. Example: 14

Update the status of a task.

requires authentication

This endpoint updates the status of a specified task. The user must be authenticated and have permission to set the new status. A notification will be sent to all users and clients associated with the task.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/tasks/1/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"statusId\": 2,
    \"note\": \"Updated due to client request.\"
}"
const url = new URL(
    "http://localhost:8000/api/tasks/1/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "statusId": 2,
    "note": "Updated due to client request."
};

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

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": "278",
    "type": "task",
    "activity_message": "Madhavan Vaidya updated task status from Ongoing to Completed",
    "data": {
        "id": 278,
        "workspace_id": 6,
        "title": "New Task",
        "status": "Completed",
        "priority": "dsfdsf",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "start_date": "20-08-2024",
        "due_date": null,
        "project": {
            "id": 419,
            "title": "Updated Project Title"
        },
        "description": "This is a detailed description of the task.",
        "note": null,
        "created_at": "06-08-2024 11:42:13",
        "updated_at": "12-08-2024 15:18:09"
    }
}
 

Example response (200):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "statusId": [
            "The selected status id is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/tasks/{id}/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the task whose status is to be updated. Example: 1

Body Parameters

statusId   integer   

The ID of the new status to set for the task. Must exist in the statuses table. Example: 2

note   string  optional  

optional An optional note to attach to the task update. Example: Updated due to client request.

Update the priority of a task.

requires authentication

This endpoint updates the priority of a specified task. The user must be authenticated and have permission to set the new priority.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/tasks/1/priority" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"priorityId\": 3
}"
const url = new URL(
    "http://localhost:8000/api/tasks/1/priority"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "priorityId": 3
};

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

Example response (200):


{
    "error": false,
    "message": "Priority updated successfully.",
    "id": "278",
    "type": "task",
    "activity_message": "Madhavan Vaidya updated task priority from Medium to High",
    "data": {
        "id": 278,
        "workspace_id": 6,
        "title": "New Task",
        "status": "Completed",
        "priority": "High",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "start_date": "20-08-2024",
        "due_date": null,
        "project": {
            "id": 419,
            "title": "Updated Project Title"
        },
        "description": "This is a detailed description of the task.",
        "note": null,
        "created_at": "06-08-2024 11:42:13",
        "updated_at": "12-08-2024 15:40:41"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The selected id is invalid."
        ],
        "priorityId": [
            "The selected priorityId is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/tasks/{id}/priority

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the task whose priority is to be updated. Example: 1

Body Parameters

priorityId   integer   

The ID of the new priority to set for the task. Must exist in the priorities table. Example: 3

Remove the specified task.

requires authentication

This endpoint deletes a task based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/tasks/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/tasks/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Task deleted successfully.",
    "id": "262",
    "title": "From API",
    "parent_id": 377,
    "parent_type": "project",
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the task."
}
 

Request      

DELETE api/tasks/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the task to be deleted. Example: 1

Task Comments

Add a comment with attachments.

requires authentication

This endpoint allows authenticated users to add comments to a specific model (e.g., tasks, projects). Users can also attach files and mention other users.

Example request:
curl --request POST \
    "http://localhost:8000/api/tasks/information/omnis/comments" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "model_type=et"\
    --form "model_id=16"\
    --form "content=sed"\
    --form "parent_id=1"\
    --form "attachments[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php2587.tmp" 
const url = new URL(
    "http://localhost:8000/api/tasks/information/omnis/comments"
);

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

const body = new FormData();
body.append('model_type', 'et');
body.append('model_id', '16');
body.append('content', 'sed');
body.append('parent_id', '1');
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": 45,
        "commentable_type": "App\\Models\\Task",
        "commentable_id": 438,
        "content": "This is a sample comment with a mention @JohnDoe",
        "user_id": 7,
        "parent_id": null,
        "created_at": "2 minutes ago",
        "attachments": [
            {
                "id": 1,
                "file_name": "document.pdf",
                "file_path": "comment_attachments/document.pdf",
                "file_type": "application/pdf"
            }
        ]
    },
    "user": {
        "id": 7,
        "name": "John Doe"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation errors occurred",
    "errors": {
        "content": [
            "Please enter a comment."
        ]
    }
}
 

Example response (500):


{
    "success": false,
    "message": "Comment could not be added."
}
 

Request      

POST api/tasks/information/{id}/comments

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

URL Parameters

id   string   

The ID of the information. Example: omnis

Body Parameters

model_type   string   

The type of model being commented on (e.g., "Task", "Project"). Example: et

model_id   integer   

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

content   string   

The comment text. Example: sed

parent_id   integer  optional  

optional The ID of the parent comment (for replies). Example: 1

attachments[]   file  optional  

optional An array of files to attach to the comment. Supported formats: jpg, jpeg, png, pdf, xlsx, txt, docx (max size: 2MB). Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php2587.tmp

Get details of a specific comment.

requires authentication

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

Example request:
curl --request GET \
    --get "http://localhost:8000/api/tasks/comments/get/11" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/tasks/comments/get/11"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Comment retrieved successfully.",
    "comment": {
        "id": 45,
        "commentable_type": "App\\Models\\Task",
        "commentable_id": 438,
        "content": "This is a sample comment with a mention @JohnDoe",
        "user_id": 7,
        "parent_id": null,
        "created_at": "2025-03-03 14:00:00",
        "updated_at": "2025-03-03 16:00:00",
        "attachments": [
            {
                "id": 1,
                "file_name": "document.pdf",
                "file_path": "comment_attachments/document.pdf",
                "file_type": "application/pdf"
            }
        ]
    }
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Could not retrieve comment."
}
 

Request      

GET api/tasks/comments/get/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the comment to retrieve. Example: 11

Update a comment.

requires authentication

This endpoint updates a specified comment. The user must be authenticated and have permission to modify the comment.

Example request:
curl --request POST \
    "http://localhost:8000/api/tasks/comments/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"comment_id\": 8,
    \"content\": \"possimus\"
}"
const url = new URL(
    "http://localhost:8000/api/tasks/comments/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "comment_id": 8,
    "content": "possimus"
};

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

Example response (200):


{
    "error": false,
    "message": "Comment updated successfully.",
    "id": 45,
    "type": "task"
}
 

Example response (404):


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

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "content": [
            "Please enter a comment."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/tasks/comments/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

comment_id   integer   

The ID of the comment to be updated. Example: 8

content   string   

The updated content of the comment. Example: possimus

Delete a comment.

requires authentication

This endpoint deletes a specified comment and removes its attachments from storage. The user must be authenticated and have permission to delete comments.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/tasks/comments/destroy?comment_id=12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/tasks/comments/destroy"
);

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

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Comment deleted successfully.",
    "id": 45,
    "type": "task"
}
 

Example response (404):


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

Example response (422):


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

Example response (500):


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

Request      

DELETE api/tasks/comments/destroy

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Query Parameters

comment_id   integer   

The ID of the comment to delete. Example: 12

Income vs Expense

Get the Income vs Expense Statistics.

requires authentication

This endpoint provides the Income vs Expense Statistics. The user must be authenticated to access this data.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/reports/income-vs-expense-report-data" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/reports/income-vs-expense-report-data"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "total_income": "$ 705.00",
    "total_expenses": "$ 20,000.00",
    "profit_or_loss": "$ -19,295.00",
    "invoices": [
        {
            "id": 3,
            "view_route": "http://localhost:8000/estimates-invoices/view/3",
            "amount": "$ 105.00",
            "to_date": "05-02-2025",
            "from_date": "05-02-2025"
        },
        {
            "id": 4,
            "view_route": "http://localhost:8000/estimates-invoices/view/4",
            "amount": "$ 600.00",
            "to_date": "05-02-2025",
            "from_date": "05-02-2025"
        }
    ],
    "expenses": [
        {
            "id": 1,
            "title": "Salary",
            "amount": "$ 500.00",
            "expense_date": "31-01-2025"
        },
        {
            "id": 2,
            "title": "January Rent Pay",
            "amount": "$ 5,000.00",
            "expense_date": "04-02-2025"
        },
        {
            "id": 3,
            "title": "Salary to Karen",
            "amount": "$ 5,000.00",
            "expense_date": "31-01-2025"
        },
        {
            "id": 4,
            "title": "Internet Bill Payment",
            "amount": "$ 300.00",
            "expense_date": "31-01-2025"
        },
        {
            "id": 5,
            "title": "Office Refreshment Items",
            "amount": "$ 1,000.00",
            "expense_date": "31-01-2025"
        },
        {
            "id": 9,
            "title": "Transportation Fuel",
            "amount": "$ 2,000.00",
            "expense_date": "08-02-2025"
        },
        {
            "id": 10,
            "title": "Corporate Tax",
            "amount": "$ 1,200.00",
            "expense_date": "08-02-2025"
        },
        {
            "id": 11,
            "title": "Event Sponsorships",
            "amount": "$ 5,000.00",
            "expense_date": "08-02-2025"
        }
    ]
}
 

Example response (500):


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

Request      

GET api/reports/income-vs-expense-report-data

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Status Management

List or search statuses.

requires authentication

This endpoint retrieves a list of statuses based on various filters. The user must be authenticated to perform this action. The request allows searching and sorting by different parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/statuses/1?search=Active&sort=title&order=ASC&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/statuses/1"
);

const params = {
    "search": "Active",
    "sort": "title",
    "order": "ASC",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Statuses retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 1,
            "title": "Active",
            "color": "primary",
            "created_at": "20-07-2024 17:50:09",
            "updated_at": "21-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/statuses/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the status to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter statuses by title or id. Example: Active

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, color, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

limit   integer  optional  

optional The number of statuses per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Create a new status.

requires authentication

This endpoint allows authenticated users to create a new status with a unique slug and assign roles to it.

Example request:
curl --request POST \
    "http://localhost:8000/api/status/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"numquam\",
    \"color\": \"voluptatem\",
    \"role_ids\": [
        \"esse\"
    ]
}"
const url = new URL(
    "http://localhost:8000/api/status/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "numquam",
    "color": "voluptatem",
    "role_ids": [
        "esse"
    ]
};

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

Example response (200):


{
    "error": false,
    "message": "Status created successfully.",
    "id": 101,
    "status": {
        "id": 101,
        "title": "In Progress",
        "color": "primary",
        "slug": "in-progress"
    }
}
 

Example response (422):


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

Example response (500):


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

Request      

POST api/status/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the status. Example: numquam

color   string   

The color code associated with the status. Example: voluptatem

role_ids   string[]  optional  

optional An array of role IDs to be associated with the status.

Update an existing status.

requires authentication

This endpoint allows authenticated users to update a status, including modifying the title, color, and associated roles.

Example request:
curl --request POST \
    "http://localhost:8000/api/status/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 15,
    \"title\": \"distinctio\",
    \"color\": \"et\",
    \"role_ids\": [
        \"necessitatibus\"
    ]
}"
const url = new URL(
    "http://localhost:8000/api/status/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 15,
    "title": "distinctio",
    "color": "et",
    "role_ids": [
        "necessitatibus"
    ]
};

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

Example response (200):


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

Example response (404):


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

Example response (422):


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

Example response (500):


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

Request      

POST api/status/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the status to update. Example: 15

title   string   

The updated title of the status. Example: distinctio

color   string   

The updated color code associated with the status. Example: et

role_ids   string[]  optional  

optional An array of role IDs to associate with the status.

Get details of a specific status.

requires authentication

This endpoint retrieves the details of a specific status, including the roles associated with it.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/status/get/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/status/get/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Status retrieved successfully.",
    "status": {
        "id": 101,
        "title": "In Progress",
        "color": "primary",
        "slug": "in-progress"
    },
    "roles": [
        1,
        2,
        3
    ]
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Could not retrieve status."
}
 

Request      

GET api/status/get/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the status to retrieve. Example: 16

Delete a status.

requires authentication

This endpoint allows authenticated users to delete a specific status. Before deletion, all associated projects and tasks will be updated to have a default status ID of 0.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/status/destroy/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/status/destroy/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Status deleted successfully.",
    "id": 101,
    "title": "In Progress"
}
 

Example response (404):


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

Example response (500):


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

Request      

DELETE api/status/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the status to delete. Example: 9

Priority Management

List or search priorities.

requires authentication

This endpoint retrieves a list of priorities based on various filters. The user must be authenticated to perform this action. The request allows searching and sorting by different parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/priorities/1?search=High&sort=title&order=ASC&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/priorities/1"
);

const params = {
    "search": "High",
    "sort": "title",
    "order": "ASC",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Priorities retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 1,
            "title": "High",
            "color": "primary",
            "created_at": "20-07-2024 17:50:09",
            "updated_at": "21-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/priorities/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the priority to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter priorities by title or id. Example: High

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, color, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

limit   integer  optional  

optional The number of priorities per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Tag Management

List or search tags.

requires authentication

This endpoint retrieves a list of tags based on various filters. The user must be authenticated to perform this action. The request allows searching and sorting by different parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/tags/1?search=Urgent&sort=title&order=ASC&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/tags/1"
);

const params = {
    "search": "Urgent",
    "sort": "title",
    "order": "ASC",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Tags retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 1,
            "title": "Urgent",
            "color": "primary",
            "created_at": "20-07-2024 17:50:09",
            "updated_at": "21-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/tags/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the tag to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter tags by title or id. Example: Urgent

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

limit   integer  optional  

optional The number of tags per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

User Management

List or search users.

requires authentication

This endpoint retrieves a list of users based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, search term, role, type, type_id, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/users/1?search=John&sort=id&order=ASC&status=1&role_ids[]=1&role_ids[]=2&type=project&type_id=3&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/users/1"
);

const params = {
    "search": "John",
    "sort": "id",
    "order": "ASC",
    "status": "1",
    "role_ids[0]": "1",
    "role_ids[1]": "2",
    "type": "project",
    "type_id": "3",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Users retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 219,
            "first_name": "Test",
            "last_name": "Test",
            "role": "Member",
            "email": "test@gmail.com",
            "phone": "+91 1111111111",
            "dob": "09-08-2024",
            "doj": "09-08-2024",
            "address": "Test",
            "city": "Test",
            "state": "Test",
            "country": "Test",
            "zip": "111-111",
            "photo": "https://test-taskify.infinitietech.com/storage/photos/K0OAOzWyoeD0ZXBzgsaeHZUZERbOTKRljRIYOEYU.png",
            "status": 1,
            "created_at": "09-08-2024 17:04:29",
            "updated_at": "09-08-2024 17:04:29",
            "assigned": {
                "projects": 0,
                "tasks": 0
            }
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Example response (200):


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

Example response (200):


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

Request      

GET api/users/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the user to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter users by id, first name, last name, phone, or email. Example: John

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, phone, dob, doj, created_at, and updated_at. Example: id

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status   integer  optional  

optional The status ID to filter users by, either 0 or 1. Example: 1

role_ids   string[]  optional  

optional The role IDs to filter users by.

type   string  optional  

optional The type of filter to apply, either "project" or "task". Example: project

type_id   integer  optional  

optional The ID associated with the type filter. Example: 3

limit   integer  optional  

optional The number of users per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Create a new user.

requires authentication

This endpoint creates a new user with the provided details. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john.doe@example.com"\
    --form "password=password123"\
    --form "password_confirmation=password123"\
    --form "address=123 Main St"\
    --form "phone=1234567890"\
    --form "country_code=+91"\
    --form "country_iso_code=in"\
    --form "city=New York"\
    --form "state=NY"\
    --form "country=USA"\
    --form "zip=10001"\
    --form "dob=1990-01-01"\
    --form "doj=2024-01-01"\
    --form "role=1"\
    --form "status=1"\
    --form "require_ev=1"\
    --form "profile=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php209E.tmp" 
const url = new URL(
    "http://localhost:8000/api/users/store"
);

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

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john.doe@example.com');
body.append('password', 'password123');
body.append('password_confirmation', 'password123');
body.append('address', '123 Main St');
body.append('phone', '1234567890');
body.append('country_code', '+91');
body.append('country_iso_code', 'in');
body.append('city', 'New York');
body.append('state', 'NY');
body.append('country', 'USA');
body.append('zip', '10001');
body.append('dob', '1990-01-01');
body.append('doj', '2024-01-01');
body.append('role', '1');
body.append('status', '1');
body.append('require_ev', '1');
body.append('profile', document.querySelector('input[name="profile"]').files[0]);

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

Example response (200):


{
    "error": false,
    "message": "User created successfully.",
    "id": 219,
    "data": {
        "id": 219,
        "first_name": "Test",
        "last_name": "Test",
        "role": "Member",
        "email": "test@gmail.com",
        "phone": "+91 1111111111",
        "dob": "09-08-2024",
        "doj": "09-08-2024",
        "address": "Test",
        "city": "Test",
        "state": "Test",
        "country": "Test",
        "zip": "111-111",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/K0OAOzWyoeD0ZXBzgsaeHZUZERbOTKRljRIYOEYU.png",
        "status": 1,
        "created_at": "09-08-2024 17:04:29",
        "updated_at": "09-08-2024 17:04:29",
        "assigned": {
            "projects": 0,
            "tasks": 0
        }
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "first_name": [
            "The first name field is required."
        ],
        "last_name": [
            "The last name field is required."
        ],
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "User couldn’t be created, please make sure email settings are operational."
}
 

Request      

POST api/users/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

Body Parameters

first_name   string   

The first name of the user. Example: John

last_name   string   

The last name of the user. Example: Doe

email   string   

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

password   string   

The password for the user. Example: password123

password_confirmation   string   

The password confirmation. Example: password123

address   string  optional  

nullable The address of the user. Example: 123 Main St

phone   string  optional  

nullable The phone number of the user. Example: 1234567890

country_code   string  optional  

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

country_iso_code   string  optional  

nullable The ISO code for the phone number. Example: in

city   string  optional  

nullable The city of the user. Example: New York

state   string  optional  

nullable The state of the user. Example: NY

country   string  optional  

nullable The country of the user. Example: USA

zip   string  optional  

nullable The ZIP code of the user. Example: 10001

dob   string  optional  

nullable The date of birth of the user in the format specified in the general settings. Example: 1990-01-01

doj   string  optional  

nullable The date of joining in the format specified in the general settings. Example: 2024-01-01

role   integer   

The ID of the role for the user. Example: 1

profile   file  optional  

nullable The profile photo of the user. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php209E.tmp

status   boolean   

0 or 1. If Deactivated (0), the user won't be able to log in to their account. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else 0 will be considered by default. Example: true

require_ev   boolean   

0 or 1. If Yes (1) is selected, the user will receive a verification link via email. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else 1 will be considered by default. Example: true

Update an existing user.

requires authentication

This endpoint updates the details of an existing user. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/users/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "id=1"\
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john.doe@example.com"\
    --form "password=newpassword123"\
    --form "password_confirmation=newpassword123"\
    --form "address=123 Main St"\
    --form "phone=1234567890"\
    --form "country_code=+91"\
    --form "country_iso_code=in"\
    --form "city=New York"\
    --form "state=NY"\
    --form "country=USA"\
    --form "zip=10001"\
    --form "dob=1990-01-01"\
    --form "doj=2024-01-01"\
    --form "role=1"\
    --form "status=1"\
    --form "profile=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php20AF.tmp" 
const url = new URL(
    "http://localhost:8000/api/users/update"
);

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

const body = new FormData();
body.append('id', '1');
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john.doe@example.com');
body.append('password', 'newpassword123');
body.append('password_confirmation', 'newpassword123');
body.append('address', '123 Main St');
body.append('phone', '1234567890');
body.append('country_code', '+91');
body.append('country_iso_code', 'in');
body.append('city', 'New York');
body.append('state', 'NY');
body.append('country', 'USA');
body.append('zip', '10001');
body.append('dob', '1990-01-01');
body.append('doj', '2024-01-01');
body.append('role', '1');
body.append('status', '1');
body.append('profile', document.querySelector('input[name="profile"]').files[0]);

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

Example response (200):


{
    "error": false,
    "message": "User updated successfully.",
    "id": 219,
    "data": {
        "id": 219,
        "first_name": "APII",
        "last_name": "User",
        "role": "Member",
        "email": "test@gmail.com",
        "phone": "+91 1111111111",
        "dob": "09-08-2024",
        "doj": "09-08-2024",
        "address": "Test adr",
        "city": "Test cty",
        "state": "Test ct",
        "country": "test ctr",
        "zip": "111-111",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/28NcF6qzmIRiOhN9zrtEu5x1iN55OBspR9o1ONMO.webp",
        "status": "1",
        "created_at": "09-08-2024 17:04:29",
        "updated_at": "09-08-2024 18:32:10",
        "assigned": {
            "projects": 14,
            "tasks": 12
        }
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "first_name": [
            "The first name field is required."
        ],
        "last_name": [
            "The last name field is required."
        ],
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/users/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

Body Parameters

id   integer   

The ID of the user to be updated. Example: 1

first_name   string   

The first name of the user. Example: John

last_name   string   

The last name of the user. Example: Doe

email   string   

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

password   string  optional  

nullable The new password for the user. Can only be updated if is_admin_or_has_all_data_access is true for the logged-in user. Example: newpassword123

password_confirmation   string  optional  

required_with:password The password confirmation. Example: newpassword123

address   string  optional  

nullable The address of the user. Example: 123 Main St

phone   string  optional  

nullable The phone number of the user. Example: 1234567890

country_code   string  optional  

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

country_iso_code   string  optional  

nullable The ISO code for the phone number. Example: in

city   string  optional  

nullable The city of the user. Example: New York

state   string  optional  

nullable The state of the user. Example: NY

country   string  optional  

nullable The country of the user. Example: USA

zip   string  optional  

nullable The ZIP code of the user. Example: 10001

dob   string  optional  

nullable The date of birth of the user in the format specified in the general settings. Example: 1990-01-01

doj   string  optional  

nullable The date of joining in the format specified in the general settings. Example: 2024-01-01

role   integer   

The ID of the role for the user. Example: 1

profile   file  optional  

nullable The new profile photo of the user. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php20AF.tmp

status   boolean   

0 or 1. If Deactivated (0), the user won't be able to log in to their account. Can only specify status if is_admin_or_has_all_data_access is true for the logged-in user, else the current status will be considered by default. Example: true

Remove the specified user.

requires authentication

This endpoint deletes a user based on the provided ID. The request must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/users/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/users/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "User deleted successfully.",
    "id": "1",
    "title": "John Doe",
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An internal server error occurred."
}
 

Request      

DELETE api/users/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the user to be deleted. Example: 1

Client Management

List or search clients.

requires authentication

This endpoint retrieves a list of clients based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, search term, type, type_id, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/clients/1?search=John&sort=id&order=ASC&status=1&type=project&type_id=3&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/clients/1"
);

const params = {
    "search": "John",
    "sort": "id",
    "order": "ASC",
    "status": "1",
    "type": "project",
    "type_id": "3",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Clients retrieved successfully",
    "total": 1,
    "clients": [
        {
            "id": 185,
            "first_name": "Client",
            "last_name": "Test",
            "company": "Test Company",
            "email": "client@test.com",
            "phone": "1 5555555555",
            "status": 1,
            "internal_purpose": 1,
            "created_at": "10-06-2024",
            "updated_at": "29-07-2024",
            "assigned": {
                "projects": 0,
                "tasks": 0
            }
        }
    ]
}
 

Example response (200):


{
    "error": true,
    "message": "Client not found",
    "total": 0,
    "clients": []
}
 

Example response (200):


{
    "error": true,
    "message": "Clients not found",
    "total": 0,
    "clients": []
}
 

Example response (200):


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

Example response (200):


{
    "error": true,
    "message": "Task not found",
    "total": 0,
    "clients": []
}
 

Request      

GET api/clients/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the client to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter clients by id, first name, last name, comapny, phone, or email. Example: John

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, company, phone, created_at, and updated_at. Example: id

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status   integer  optional  

optional The status ID to filter clients by, either 0 or 1. Example: 1

type   string  optional  

optional The type of filter to apply, either "project" or "task". Example: project

type_id   integer  optional  

optional The ID associated with the type filter. Example: 3

limit   integer  optional  

optional The number of clients per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Store a new client.

requires authentication

This endpoint creates a new client. The client must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/clients/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "company=Example Corp"\
    --form "email=john.doe@example.com"\
    --form "phone=1234567890"\
    --form "country_code=+91"\
    --form "country_iso_code=in"\
    --form "password=password123"\
    --form "password_confirmation=password123"\
    --form "address=123 Main St"\
    --form "city=New York"\
    --form "state=NY"\
    --form "country=USA"\
    --form "zip=10001"\
    --form "dob=1990-01-01"\
    --form "doj=2024-01-01"\
    --form "internal_purpose=on"\
    --form "status=1"\
    --form "require_ev=1"\
    --form "profile=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php20FE.tmp" 
const url = new URL(
    "http://localhost:8000/api/clients/store"
);

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

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('company', 'Example Corp');
body.append('email', 'john.doe@example.com');
body.append('phone', '1234567890');
body.append('country_code', '+91');
body.append('country_iso_code', 'in');
body.append('password', 'password123');
body.append('password_confirmation', 'password123');
body.append('address', '123 Main St');
body.append('city', 'New York');
body.append('state', 'NY');
body.append('country', 'USA');
body.append('zip', '10001');
body.append('dob', '1990-01-01');
body.append('doj', '2024-01-01');
body.append('internal_purpose', 'on');
body.append('status', '1');
body.append('require_ev', '1');
body.append('profile', document.querySelector('input[name="profile"]').files[0]);

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

Example response (200):


{
    "error": false,
    "message": "Client created successfully.",
    "data": {
        "id": 183,
        "first_name": "API",
        "last_name": "Client",
        "company": "test",
        "email": "777@gmail.com",
        "phone": "+91 1111111111",
        "address": "Test adr",
        "city": "Test cty",
        "state": "Test ct",
        "country": "test ctr",
        "zip": "111-111",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/a5xT73btrbk7sybc0768Bv8xlBn16ROK1Znf1Ddc.webp",
        "status": "1",
        "internal_purpose": 0,
        "created_at": "09-08-2024 19:22:17",
        "updated_at": "09-08-2024 20:10:06",
        "assigned": {
            "projects": 0,
            "tasks": 0
        }
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "first_name": [
            "The first name field is required."
        ],
        "last_name": [
            "The last name field is required."
        ],
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "Client couldn’t be created, please make sure email settings are operational."
}
 

Request      

POST api/clients/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

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  

nullable The company of the client. Example: Example Corp

email   string   

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

phone   string  optional  

nullable The phone number of the client. Example: 1234567890

country_code   string  optional  

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

country_iso_code   string  optional  

nullable The ISO code for the phone number. Example: in

password   string   

The password for the client. Must be confirmed and at least 6 characters long. Example: password123

password_confirmation   string   

The password confirmation. Required if password is provided. Example: password123

address   string  optional  

nullable The address of the client. Example: 123 Main St

city   string  optional  

nullable The city of the client. Example: New York

state   string  optional  

nullable The state of the client. Example: NY

country   string  optional  

nullable The country of the client. Example: USA

zip   string  optional  

nullable The ZIP code of the client. Example: 10001

dob   string  optional  

nullable The date of birth of the user in the format specified in the general settings. Example: 1990-01-01

doj   string  optional  

nullable The date of joining in the format specified in the general settings. Example: 2024-01-01

internal_purpose   string  optional  

nullable Set to 'on' if the client is for internal purposes. Example: on

profile   file  optional  

nullable The profile photo of the client. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php20FE.tmp

status   boolean   

0 or 1. If Deactivated (0), the client won't be able to log in to their account. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else 0 will be considered by default. Example: true

require_ev   boolean   

0 or 1. If Yes (1) is selected, the client will receive a verification link via email. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else 1 will be considered by default. Example: true

Update an existing client.

requires authentication

This endpoint updates the details of an existing client. The client must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/clients/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: multipart/form-data" \
    --form "id=1"\
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "company=XYZ"\
    --form "email=john.doe@example.com"\
    --form "password=newpassword123"\
    --form "password_confirmation=newpassword123"\
    --form "address=123 Main St"\
    --form "phone=1234567890"\
    --form "country_code=+91"\
    --form "country_iso_code=in"\
    --form "city=New York"\
    --form "state=NY"\
    --form "country=USA"\
    --form "zip=10001"\
    --form "dob=1990-01-01"\
    --form "doj=2024-01-01"\
    --form "internal_purpose=on"\
    --form "status=1"\
    --form "require_ev=1"\
    --form "profile=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\php210F.tmp" 
const url = new URL(
    "http://localhost:8000/api/clients/update"
);

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

const body = new FormData();
body.append('id', '1');
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('company', 'XYZ');
body.append('email', 'john.doe@example.com');
body.append('password', 'newpassword123');
body.append('password_confirmation', 'newpassword123');
body.append('address', '123 Main St');
body.append('phone', '1234567890');
body.append('country_code', '+91');
body.append('country_iso_code', 'in');
body.append('city', 'New York');
body.append('state', 'NY');
body.append('country', 'USA');
body.append('zip', '10001');
body.append('dob', '1990-01-01');
body.append('doj', '2024-01-01');
body.append('internal_purpose', 'on');
body.append('status', '1');
body.append('require_ev', '1');
body.append('profile', document.querySelector('input[name="profile"]').files[0]);

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

Example response (200):


{
    "error": false,
    "message": "Client updated successfully.",
    "data": {
        "id": 183,
        "first_name": "API",
        "last_name": "Client",
        "company": "test",
        "email": "777@gmail.com",
        "phone": "+91 1111111111",
        "address": "Test adr",
        "city": "Test cty",
        "state": "Test ct",
        "country": "test ctr",
        "zip": "111-111",
        "photo": "https://test-taskify.infinitietech.com/storage/photos/a5xT73btrbk7sybc0768Bv8xlBn16ROK1Znf1Ddc.webp",
        "status": "1",
        "internal_purpose": 0,
        "created_at": "09-08-2024 19:22:17",
        "updated_at": "09-08-2024 20:10:06",
        "assigned": {
            "projects": 0,
            "tasks": 0
        }
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "first_name": [
            "The first name field is required."
        ],
        "last_name": [
            "The last name field is required."
        ],
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/clients/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: multipart/form-data

Body Parameters

id   integer   

The ID of the client to be updated. Example: 1

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  

nullable The company of the client. Example: XYZ

email   string   

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

password   string  optional  

nullable The new password for the client. Can only be updated if is_admin_or_has_all_data_access is true for the logged-in user. Example: newpassword123

password_confirmation   string  optional  

required_with:password The password confirmation. Example: newpassword123

address   string  optional  

nullable The address of the client. Example: 123 Main St

phone   string  optional  

nullable The phone number of the client. Example: 1234567890

country_code   string  optional  

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

country_iso_code   string  optional  

nullable The ISO code for the phone number. Example: in

city   string  optional  

nullable The city of the client. Example: New York

state   string  optional  

nullable The state of the client. Example: NY

country   string  optional  

nullable The country of the client. Example: USA

zip   string  optional  

nullable The ZIP code of the client. Example: 10001

dob   string  optional  

nullable The date of birth of the user in the format specified in the general settings. Example: 1990-01-01

doj   string  optional  

nullable The date of joining in the format specified in the general settings. Example: 2024-01-01

internal_purpose   string  optional  

nullable Set to 'on' if the client is for internal purposes. Example: on

profile   file  optional  

nullable The new profile photo of the client. Example: C:\Users\infin_8kk6o2v\AppData\Local\Temp\php210F.tmp

status   boolean   

0 or 1. If Deactivated (0), the client won't be able to log in to their account. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else the current status will be considered by default. Example: true

require_ev   boolean   

0 or 1. If Yes (1) is selected, the client will receive a verification link via email. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else the current require_ev will be considered by default. Example: true

Remove the specified client.

requires authentication

This endpoint deletes a client based on the provided ID. The request must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/clients/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/clients/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "data": {
        "error": false,
        "message": "Client deleted successfully.",
        "id": "1",
        "title": "Jane Doe",
        "data": []
    }
}
 

Example response (200):


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

Example response (500):


{
    "data": {
        "error": true,
        "message": "An internal server error occurred."
    }
}
 

Request      

DELETE api/clients/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the client to be deleted. Example: 1

Workspace Management

Create a new workspace.

requires authentication

This endpoint creates a new workspace with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title and participants.

Example request:
curl --request POST \
    "http://localhost:8000/api/workspaces/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Design Team\",
    \"user_ids\": \"[1, 2, 3]\",
    \"client_ids\": \"[5, 6]\",
    \"primaryWorkspace\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/workspaces/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "Design Team",
    "user_ids": "[1, 2, 3]",
    "client_ids": "[5, 6]",
    "primaryWorkspace": "on"
};

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://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"
            }
        ],
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 14:38:51"
    }
}
 

Example response (422):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the workspace."
}
 

Request      

POST api/workspaces/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the workspace. Example: Design Team

user_ids   array|null  optional  

optional Array of user IDs to be associated with the workspace. Example: [1, 2, 3]

client_ids   array|null  optional  

optional Array of client IDs to be associated with the workspace. Example: [5, 6]

primaryWorkspace   string  optional  

optional Indicates if this workspace should be set as primary. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else it will be considered 0 by default. The value should be 'on' to set as primary. Example: on

List or search workspaces.

requires authentication

This endpoint retrieves a list of workspaces based on various filters. The user must be authenticated to perform this action. The request allows filtering by user, client, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/workspaces/1?search=Workspace&sort=title&order=ASC&user_id=1&client_id=5&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/workspaces/1"
);

const params = {
    "search": "Workspace",
    "sort": "title",
    "order": "ASC",
    "user_id": "1",
    "client_id": "5",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Workspaces retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 351,
            "title": "Workspace Title",
            "is_primary": 0,
            "users": [
                {
                    "id": 7,
                    "first_name": "Madhavan",
                    "last_name": "Vaidya",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
                }
            ],
            "clients": [
                {
                    "id": 12,
                    "first_name": "Client",
                    "last_name": "Name",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/client-photo.png"
                }
            ],
            "created_at": "20-07-2024 17:50:09",
            "updated_at": "21-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/workspaces/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the workspace to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter workspaces by title or id. Example: Workspace

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

user_id   integer  optional  

optional The user ID to filter workspaces by. Example: 1

client_id   integer  optional  

optional The client ID to filter workspaces by. Example: 5

limit   integer  optional  

optional The number of workspaces per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Update an existing workspace.

requires authentication

This endpoint updates the details of an existing workspace. The user must be authenticated to perform this action. The request validates various fields, including title and participants.

Example request:
curl --request POST \
    "http://localhost:8000/api/workspaces/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 438,
    \"title\": \"Design Team\",
    \"user_ids\": \"[1, 2, 3]\",
    \"client_ids\": \"[5, 6]\",
    \"primaryWorkspace\": \"on\"
}"
const url = new URL(
    "http://localhost:8000/api/workspaces/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 438,
    "title": "Design Team",
    "user_ids": "[1, 2, 3]",
    "client_ids": "[5, 6]",
    "primaryWorkspace": "on"
};

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

Example response (200):


{
    "error": false,
    "message": "Workspace updated successfully.",
    "id": 438,
    "data": {
        "id": 438,
        "title": "Design Team",
        "is_primary": true,
        "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"
            }
        ],
        "created_at": "07-08-2024 14:38:51",
        "updated_at": "07-08-2024 14:38:51"
    }
}
 

Example response (422):


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

Example response (500):


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

Request      

POST api/workspaces/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the workspace to update. Example: 438

title   string   

The new title of the workspace. Example: Design Team

user_ids   array|null  optional  

optional Array of user IDs to be associated with the workspace. Example: [1, 2, 3]

client_ids   array|null  optional  

optional Array of client IDs to be associated with the workspace. Example: [5, 6]

primaryWorkspace   string  optional  

optional Indicates if this workspace should be set as primary. Can only specify if is_admin_or_has_all_data_access is true for the logged-in user, else current value will be considered by default. The value should be 'on' to set as primary. Example: on

Remove the specified workspace.

requires authentication

This endpoint deletes a workspace based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/workspaces/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/workspaces/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Workspace deleted successfully.",
    "id": "60",
    "title": "Workspace Title",
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the workspace."
}
 

Request      

DELETE api/workspaces/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the workspace to be deleted. Example: 1

Set or remove a default workspace for the authenticated user.

requires authentication

This endpoint updates whether a workspace is set as the default workspace for the user. The user must be authenticated to perform this action.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/workspaces/2/default" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"is_default\": false
}"
const url = new URL(
    "http://localhost:8000/api/workspaces/2/default"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "is_default": false
};

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

Example response (200):


{
"error": false,
"message": "Default status updated successfully"
"data":[Workspace data here]
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Failed to update default workspace"
}
 

Request      

PATCH api/workspaces/{id}/default

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the workspace to update. Example: 2

Body Parameters

is_default   boolean   

Indicates whether the workspace should be set as default. Use 1 for setting as default and 0 for removing it as default. Example: false

Remove the authenticated user from the current workspace.

requires authentication

This endpoint removes the authenticated user from the workspace they are currently in. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/workspaces/remove-participant" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/workspaces/remove-participant"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
  "error": false,
  "message": "Removed from workspace successfully.",
  "data": {
    "workspace_id": 1
  }
}
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while removing the participant from the workspace."
}
 

Request      

DELETE api/workspaces/remove-participant

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Meeting Management

Create a new meeting.

requires authentication

This endpoint creates a new meeting with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title, start and end dates, start and end times, and participant IDs.

Example request:
curl --request POST \
    "http://localhost:8000/api/meetings/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Project Kickoff\",
    \"start_date\": \"25-07-2024\",
    \"end_date\": \"25-07-2024\",
    \"start_time\": \"10:00\",
    \"end_time\": \"11:00\",
    \"user_ids\": [
        1,
        2,
        3
    ],
    \"client_ids\": [
        4,
        5
    ]
}"
const url = new URL(
    "http://localhost:8000/api/meetings/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "Project Kickoff",
    "start_date": "25-07-2024",
    "end_date": "25-07-2024",
    "start_time": "10:00",
    "end_time": "11:00",
    "user_ids": [
        1,
        2,
        3
    ],
    "client_ids": [
        4,
        5
    ]
};

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

Example response (200):


{
    "error": false,
    "message": "Meeting created successfully.",
    "id": 119,
    "data": {
        "id": 119,
        "title": "From API",
        "start_date": "25-07-2024",
        "start_time": "15:00:00",
        "end_date": "25-08-2024",
        "end_time": "11:41:05",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "status": "Ongoing",
        "created_at": "07-08-2024 17:11:05",
        "updated_at": "07-08-2024 17:11:05"
    }
}
 

Example response (422):


{
 "error": true,
 "message": "Validation errors occurred",
 "errors": {
   "title": ["The title field is required."],
   "start_date": ["The start date field is required."],
   ...
 }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the meeting."
}
 

Request      

POST api/meetings/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the meeting. Example: Project Kickoff

start_date   string   

The start date of the meeting in the format specified in the general settings. Example: 25-07-2024

end_date   string   

The end date of the meeting in the format specified in the general settings. Example: 25-07-2024

start_time   string   

The start time of the meeting in the format HH:MM. Example: 10:00

end_time   string   

The end time of the meeting in the format HH:MM. Example: 11:00

user_ids   string[]  optional  

nullable An array of user IDs to be assigned to the meeting.

client_ids   string[]  optional  

nullable An array of client IDs to be assigned to the meeting.

List or search meetings.

requires authentication

This endpoint retrieves a list of meetings based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, user, client, date ranges, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/meetings/1?search=Meeting&sort=title&order=ASC&status=ongoing&user_id=1&client_id=5&start_date_from=2024-01-01&start_date_to=2024-12-31&end_date_from=2024-01-01&end_date_to=2024-12-31&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/meetings/1"
);

const params = {
    "search": "Meeting",
    "sort": "title",
    "order": "ASC",
    "status": "ongoing",
    "user_id": "1",
    "client_id": "5",
    "start_date_from": "2024-01-01",
    "start_date_to": "2024-12-31",
    "end_date_from": "2024-01-01",
    "end_date_to": "2024-12-31",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Meetings retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 351,
            "title": "Project Kickoff",
            "start_date": "2024-07-01",
            "start_time": "10:00:00",
            "end_date": "2024-07-01",
            "end_time": "11:00:00",
            "users": [
                {
                    "id": 7,
                    "first_name": "Madhavan",
                    "last_name": "Vaidya",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
                }
            ],
            "clients": [],
            "status": "Ongoing",
            "created_at": "14-06-2024 17:50:09",
            "updated_at": "17-06-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/meetings/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the meeting to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter meetings by title or id. Example: Meeting

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, start_date_time, end_date_time, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status   string  optional  

optional The status of the meeting to filter by. Can be "ongoing", "ended", or "yet_to_start". Example: ongoing

user_id   integer  optional  

optional The user ID to filter meetings by. Example: 1

client_id   integer  optional  

optional The client ID to filter meetings by. Example: 5

start_date_from   string  optional  

optional The start date range's start in YYYY-MM-DD format. Example: 2024-01-01

start_date_to   string  optional  

optional The start date range's end in YYYY-MM-DD format. Example: 2024-12-31

end_date_from   string  optional  

optional The end date range's start in YYYY-MM-DD format. Example: 2024-01-01

end_date_to   string  optional  

optional The end date range's end in YYYY-MM-DD format. Example: 2024-12-31

limit   integer  optional  

optional The number of meetings per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Update an existing meeting.

requires authentication

This endpoint updates an existing meeting with the provided details. The user must be authenticated to perform this action. The request validates various fields, including title, dates, and times.

Example request:
curl --request POST \
    "http://localhost:8000/api/meetings/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 1,
    \"title\": \"Updated Meeting Title\",
    \"start_date\": \"2024-08-01\",
    \"end_date\": \"2024-08-31\",
    \"start_time\": \"09:00\",
    \"end_time\": \"10:00\",
    \"user_ids\": \"[2, 3]\",
    \"client_ids\": \"[5, 6]\"
}"
const url = new URL(
    "http://localhost:8000/api/meetings/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 1,
    "title": "Updated Meeting Title",
    "start_date": "2024-08-01",
    "end_date": "2024-08-31",
    "start_time": "09:00",
    "end_time": "10:00",
    "user_ids": "[2, 3]",
    "client_ids": "[5, 6]"
};

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

Example response (200):


{
    "error": false,
    "message": "Meeting updated successfully.",
    "id": 119,
    "data": {
        "id": 119,
        "title": "From API",
        "start_date": "25-07-2024",
        "start_time": "15:00:00",
        "end_date": "25-08-2024",
        "end_time": "11:45:15",
        "users": [
            {
                "id": 7,
                "first_name": "Madhavan",
                "last_name": "Vaidya",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png"
            }
        ],
        "clients": [
            {
                "id": 173,
                "first_name": "666",
                "last_name": "666",
                "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
            }
        ],
        "status": "Ongoing",
        "created_at": "07-08-2024 17:11:05",
        "updated_at": "07-08-2024 17:15:15"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The meeting ID is required.",
            "The meeting ID does not exist in our records."
        ],
        "start_date": [
            "The start date must be before or equal to the end date."
        ],
        "start_time": [
            "The start time field is required."
        ],
        "end_time": [
            "The end time field is required."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/meetings/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the meeting to update. Example: 1

title   string   

The title of the meeting. Example: Updated Meeting Title

start_date   string   

The start date of the meeting in the format specified in the general settings. Example: 2024-08-01

end_date   string   

The end date of the meeting in the format specified in the general settings. Example: 2024-08-31

start_time   string   

The start time of the meeting. Example: 09:00

end_time   string   

The end time of the meeting. Example: 10:00

user_ids   array|null  optional  

optional Array of user IDs to be associated with the meeting. Example: [2, 3]

client_ids   array|null  optional  

optional Array of client IDs to be associated with the meeting. Example: [5, 6]

Remove the specified meeting.

requires authentication

This endpoint deletes a meeting based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/meetings/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/meetings/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Meeting deleted successfully.",
    "id": 1,
    "title": "Meeting Title",
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the meeting."
}
 

Request      

DELETE api/meetings/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the meeting to be deleted. Example: 1

Todo Management

Create a new todo.

requires authentication

This endpoint creates a new todo item with the specified title, priority, and description. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/todos/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Finish report\",
    \"priority\": \"medium\",
    \"description\": \"Complete the report by end of day\"
}"
const url = new URL(
    "http://localhost:8000/api/todos/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "Finish report",
    "priority": "medium",
    "description": "Complete the report by end of day"
};

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

Example response (200):


{
    "error": false,
    "message": "Todo created successfully.",
    "id": 36,
    "data": {
        "id": 36,
        "title": "test",
        "description": "test",
        "priority": "low",
        "is_completed": 0,
        "created_at": "07-08-2024 16:30:09",
        "updated_at": "07-08-2024 16:30:09"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "priority": [
            "The priority must be one of the following: low, medium, high."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the todo."
}
 

Request      

POST api/todos/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the todo. Example: Finish report

priority   string   

The priority of the todo. Must be one of "low", "medium", or "high". Example: medium

description   string  optional  

optional A description of the todo. Example: Complete the report by end of day

List or search todos.

requires authentication

This endpoint retrieves a list of todos based on various filters. The user must be authenticated to perform this action. The request allows filtering by search term, status, and pagination parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/todos/1?search=Test&sort=created_at&order=asc&status=completed&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/todos/1"
);

const params = {
    "search": "Test",
    "sort": "created_at",
    "order": "asc",
    "status": "completed",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Todos retrieved successfully.",
    "total": 1,
    "data": [
        {
            "id": 35,
            "title": "test",
            "description": "test",
            "priority": "low",
            "is_completed": 0,
            "created_at": "07-08-2024 15:28:22",
            "updated_at": "07-08-2024 15:28:22"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while retrieving the todos."
}
 

Request      

GET api/todos/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the todo to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter todos by id, title, or description. Example: Test

sort   string  optional  

optional The field to sort by. Defaults to "is_completed". All fields are sortable. Example: created_at

order   string  optional  

optional The sort order, either "asc" or "desc". Defaults to "desc". Example: asc

status   string  optional  

optional The status to filter todos by. Example: completed

limit   integer  optional  

optional The number of todos per page for pagination. Defaults to 10. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Defaults to 0. Example: 0

Update an existing todo.

requires authentication

This endpoint updates an existing todo item with the specified title, priority, and description. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/todos/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 1,
    \"title\": \"Finish report\",
    \"priority\": \"medium\",
    \"description\": \"Complete the report by end of day\"
}"
const url = new URL(
    "http://localhost:8000/api/todos/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 1,
    "title": "Finish report",
    "priority": "medium",
    "description": "Complete the report by end of day"
};

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

Example response (200):


{
"error": false,
"message": "Todo updated successfully.",
"id": "36",
"data": {
  "id": 36,
  "is_completed": 0,
  "title": "test",
  "priority": "low",
  "description": "test",
  "created_at": "07-08-2024 16:30:09",
  "updated_at": "07-08-2024 16:30:09"
}
}

}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "title": [
            "The title field is required."
        ],
        "priority": [
            "The priority must be one of the following: low, medium, high."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/todos/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the todo to be updated. Example: 1

title   string   

The new title of the todo. Example: Finish report

priority   string   

The new priority of the todo. Must be one of "low", "medium", or "high". Example: medium

description   string  optional  

optional A new description for the todo. Example: Complete the report by end of day

Update the completion status of a todo.

requires authentication

This endpoint updates the completion status of a specified todo item. The user must be authenticated to perform this action.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/todos/1/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"status\": true
}"
const url = new URL(
    "http://localhost:8000/api/todos/1/status"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "status": true
};

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

Example response (200):


{
    "error": false,
    "message": "Status updated successfully.",
    "id": "60",
    "activity_message": "Madhavan Vaidya marked todo iouyhgyu as Completed",
    "data": {
        "id": 60,
        "title": "iouyhgyu",
        "description": "ty8uifyu",
        "priority": "medium",
        "is_completed": 1,
        "created_at": "10-08-2024 10:28:59",
        "updated_at": "12-08-2024 18:08:14"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "status": [
            "The status field is required."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/todos/{id}/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the todo whose status is to be updated. Example: 1

Body Parameters

status   boolean   

The new completion status of the todo. Example: true

Update the priority of a todo.

requires authentication

This endpoint updates the priority of a specified todo item. The user must be authenticated to perform this action. The priority must be one of 'low', 'medium', or 'high'.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/todos/1/priority" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"priority\": \"medium\"
}"
const url = new URL(
    "http://localhost:8000/api/todos/1/priority"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "priority": "medium"
};

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

Example response (200):


{
    "error": false,
    "message": "Priority updated successfully.",
    "id": "60",
    "activity_message": "Madhavan Vaidya updated the priority of todo iouyhgyu from High to Low",
    "data": {
        "id": 60,
        "title": "iouyhgyu",
        "description": "ty8uifyu",
        "priority": "low",
        "is_completed": 1,
        "created_at": "10-08-2024 10:28:59",
        "updated_at": "12-08-2024 18:11:13"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "priority": [
            "The priority field is required.",
            "The selected priority is invalid."
        ]
    }
}
 

Example response (500):


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

Request      

PATCH api/todos/{id}/priority

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

URL Parameters

id   integer   

The ID of the todo whose priority is to be updated. Example: 1

Body Parameters

priority   string   

The new priority of the todo. Must be one of 'low', 'medium', or 'high'. Example: medium

Remove the specified todo.

requires authentication

This endpoint deletes a todo item based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/todos/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/todos/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
  "error": false,
  "message": "Todo deleted successfully.",
  "id": 1,
  "title": "Todo Title"
  "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the todo."
}
 

Request      

DELETE api/todos/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the todo to be deleted. Example: 1

Note Management

Create a new note.

requires authentication

This endpoint creates a new note item with the specified title, color, and description. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/notes/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"title\": \"Meeting notes\",
    \"color\": \"warning\",
    \"description\": \"Notes from the client meeting\"
}"
const url = new URL(
    "http://localhost:8000/api/notes/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "title": "Meeting notes",
    "color": "warning",
    "description": "Notes from the client meeting"
};

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

Example response (200):


{
    "error": false,
    "message": "Note created successfully.",
    "id": 44,
    "data": {
        "id": 44,
        "title": "Test Note",
        "color": "info",
        "description": "test",
        "workspace_id": 6,
        "creator_id": "u_7",
        "created_at": "07-08-2024 16:24:57",
        "updated_at": "07-08-2024 16:24:57"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color must be one of the following: info, warning, danger."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the note."
}
 

Request      

POST api/notes/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

title   string   

The title of the note. Example: Meeting notes

color   string   

The color associated with the note. Must be one of "info", "warning", or "danger". Example: warning

description   string  optional  

optional A description of the note. Example: Notes from the client meeting

List or search notes.

requires authentication

This endpoint retrieves a list of notes based on various filters. The user must be authenticated to perform this action. The request allows filtering by search term and pagination parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/notes/1?search=Test&sort=created_at&order=asc&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/notes/1"
);

const params = {
    "search": "Test",
    "sort": "created_at",
    "order": "asc",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Notes retrieved successfully.",
    "total": 1,
    "data": [
        {
            "id": 43,
            "title": "upper",
            "color": "warning",
            "description": "jhdcsd",
            "workspace_id": 6,
            "creator_id": "u_7",
            "created_at": "07-08-2024 16:12:13",
            "updated_at": "07-08-2024 16:12:13"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while retrieving the notes."
}
 

Request      

GET api/notes/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the note to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter notes by id, title, or description. Example: Test

sort   string  optional  

optional The field to sort by. Defaults to "is_completed". All fields are sortable. Example: created_at

order   string  optional  

optional The sort order, either "asc" or "desc". Defaults to "desc". Example: asc

limit   integer  optional  

optional The number of notes per page for pagination. Defaults to 10. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Defaults to 0. Example: 0

Update an existing note.

requires authentication

This endpoint updates an existing note item with the specified title, color, and description. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/notes/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 1,
    \"title\": \"Meeting notes\",
    \"color\": \"warning\",
    \"description\": \"Notes from the client meeting\"
}"
const url = new URL(
    "http://localhost:8000/api/notes/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 1,
    "title": "Meeting notes",
    "color": "warning",
    "description": "Notes from the client meeting"
};

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

Example response (200):


{
    "error": false,
    "message": "Note updated successfully.",
    "id": 44,
    "data": {
        "id": 44,
        "title": "Test Note",
        "color": "info",
        "description": "test",
        "workspace_id": 6,
        "creator_id": "u_7",
        "created_at": "07-08-2024 16:24:57",
        "updated_at": "07-08-2024 16:24:57"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The id field is required."
        ],
        "title": [
            "The title field is required."
        ],
        "color": [
            "The color must be one of the following: info, warning, danger."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/notes/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the note to be updated. Example: 1

title   string   

The new title of the note. Example: Meeting notes

color   string   

The new color of the note. Must be one of "info", "warning", or "danger". Example: warning

description   string  optional  

optional A new description for the note. Example: Notes from the client meeting

Remove the specified note.

requires authentication

This endpoint deletes a note item based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/notes/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/notes/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Note deleted successfully.",
    "id": 1,
    "title": "Note Title",
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the note."
}
 

Request      

DELETE api/notes/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the note to be deleted. Example: 1

Leave Request Management

Create a new leave request.

requires authentication

This endpoint creates a new leave request with the provided details. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/leave-requests/store" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"reason\": \"Family function\",
    \"from_date\": \"2024-08-05\",
    \"to_date\": \"2024-08-01\",
    \"from_time\": \"09:00\",
    \"to_time\": \"17:00\",
    \"status\": \"pending\",
    \"leaveVisibleToAll\": \"on\",
    \"visible_to_ids\": [
        1,
        2,
        3
    ],
    \"user_id\": 4,
    \"partialLeave\": \"on\",
    \"comment\": \"Approved due to exceptional circumstances\"
}"
const url = new URL(
    "http://localhost:8000/api/leave-requests/store"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "reason": "Family function",
    "from_date": "2024-08-05",
    "to_date": "2024-08-01",
    "from_time": "09:00",
    "to_time": "17:00",
    "status": "pending",
    "leaveVisibleToAll": "on",
    "visible_to_ids": [
        1,
        2,
        3
    ],
    "user_id": 4,
    "partialLeave": "on",
    "comment": "Approved due to exceptional circumstances"
};

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

Example response (200):


{
    "error": false,
    "message": "Leave request created successfully.",
    "id": 187,
    "type": "leave_request",
    "data": {
        "id": 187,
        "user_name": "Madhavan Vaidya",
        "user_photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png",
        "action_by": null,
        "action_by_id": null,
        "from_date": "Wed, 07-08-2024",
        "to_date": "Wed, 07-08-2024",
        "type": "Full",
        "duration": "1 day",
        "reason": "Test",
        "status": "Pending",
        "visible_to": null,
        "created_at": "07-08-2024 18:31:28",
        "updated_at": "07-08-2024 18:31:28"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "reason": [
            "The reason field is required."
        ],
        "from_date": [
            "The from date field is required."
        ],
        "to_date": [
            "The to date field is required."
        ],
        "from_time": [
            "The from time field is required when partial leave is checked."
        ],
        "to_time": [
            "The to time field is required when partial leave is checked."
        ]
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while creating the leave request."
}
 

Request      

POST api/leave-requests/store

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

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 specified in the general settings. Example: 2024-08-05

to_date   date   

The end date of the leave in the format specified in the general settings. Example: 2024-08-01

from_time   time  optional  

required_if:partialLeave,on The start time of the leave in HH:MM format. Example: 09:00

to_time   time  optional  

required_if:partialLeave,on The end time of the leave in HH:MM format. Example: 17:00

status   string  optional  

nullable The status of the leave request. Can be 'pending', 'approved', or 'rejected'. Example: pending

leaveVisibleToAll   string  optional  

optional Set to 'on' if the leave should be visible to all users in the workspace. Example: on

visible_to_ids   string[]  optional  

The IDs of users who can see the leave if it is not visible to all.

user_id   integer  optional  

The ID of the user requesting the leave. Only admins or leave editors can specify this. Example: 4

partialLeave   string  optional  

optional Set to 'on' if the leave is partial (specific times within a day). Example: on

comment   string  optional  

optional An optional comment that can only be set by admin or leave editor. Example: Approved due to exceptional circumstances

List or search leave requests.

requires authentication

This endpoint retrieves a list of leave requests based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, user, action_by, date ranges, type, and search term.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/leave-requests/1?search=Vacation&sort=id&order=ASC&status=pending&user_id=1&action_by_id=2&start_date_from=2024-01-01&start_date_to=2024-12-31&end_date_from=2024-01-01&end_date_to=2024-12-31&type=full&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/leave-requests/1"
);

const params = {
    "search": "Vacation",
    "sort": "id",
    "order": "ASC",
    "status": "pending",
    "user_id": "1",
    "action_by_id": "2",
    "start_date_from": "2024-01-01",
    "start_date_to": "2024-12-31",
    "end_date_from": "2024-01-01",
    "end_date_to": "2024-12-31",
    "type": "full",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Leave requests retrieved successfully",
    "total": 25,
    "data": [
        {
            "id": 175,
            "user_name": "Admin Test",
            "user_photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg",
            "action_by": null,
            "from_date": "Mon, 29-07-2024",
            "to_date": "Mon, 29-07-2024",
            "type": "Full",
            "duration": "1 day",
            "reason": "dsdsdsd",
            "status": "Pending",
            "visible_to": [
                {
                    "id": 183,
                    "first_name": "Girish",
                    "last_name": "Thacker",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
                }
            ],
            "created_at": "29-07-2024 10:02:45",
            "updated_at": "29-07-2024 10:02:45"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/leave-requests/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the leave request to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter leave requests by reason or id. Example: Vacation

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, from_date, to_date, type, reason, status, action_by_id, created_at, and updated_at. Example: id

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status   string  optional  

optional The status of the leave request to filter by. Can be "pending", "approved", "rejected", etc. Example: pending

user_id   integer  optional  

optional The user ID to filter leave requests by. Example: 1

action_by_id   integer  optional  

optional The ID of the user who acted on the request to filter by. Example: 2

start_date_from   string  optional  

optional The start date range's start in YYYY-MM-DD format. Example: 2024-01-01

start_date_to   string  optional  

optional The start date range's end in YYYY-MM-DD format. Example: 2024-12-31

end_date_from   string  optional  

optional The end date range's start in YYYY-MM-DD format. Example: 2024-01-01

end_date_to   string  optional  

optional The end date range's end in YYYY-MM-DD format. Example: 2024-12-31

type   string  optional  

optional The type of leave request. Can be "full" or "partial". Example: full

limit   integer  optional  

optional The number of leave requests per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

Update an existing leave request.

requires authentication

This endpoint updates an existing leave request with the provided details. The user must be authenticated to perform this action.

Example request:
curl --request POST \
    "http://localhost:8000/api/leave-requests/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1" \
    --header "Content-Type: application/json" \
    --data "{
    \"id\": 1,
    \"reason\": \"Family function\",
    \"from_date\": \"2024-08-05\",
    \"to_date\": \"2024-08-01\",
    \"from_time\": \"09:00\",
    \"to_time\": \"17:00\",
    \"status\": \"pending\",
    \"leaveVisibleToAll\": \"on\",
    \"visible_to_ids\": [
        1,
        2,
        3
    ],
    \"partialLeave\": \"on\",
    \"comment\": \"Approved due to exceptional circumstances\"
}"
const url = new URL(
    "http://localhost:8000/api/leave-requests/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
    "Content-Type": "application/json",
};

let body = {
    "id": 1,
    "reason": "Family function",
    "from_date": "2024-08-05",
    "to_date": "2024-08-01",
    "from_time": "09:00",
    "to_time": "17:00",
    "status": "pending",
    "leaveVisibleToAll": "on",
    "visible_to_ids": [
        1,
        2,
        3
    ],
    "partialLeave": "on",
    "comment": "Approved due to exceptional circumstances"
};

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

Example response (200):


{
    "error": false,
    "message": "Leave request updated successfully.",
    "id": 187,
    "type": "leave_request",
    "data": {
        "id": 187,
        "user_name": "Madhavan Vaidya",
        "user_photo": "https://test-taskify.infinitietech.com/storage/photos/yxNYBlFLALdLomrL0JzUY2USPLILL9Ocr16j4n2o.png",
        "action_by": null,
        "action_by_id": null,
        "from_date": "Wed, 07-08-2024",
        "to_date": "Wed, 07-08-2024",
        "type": "Full",
        "duration": "1 day",
        "reason": "Test",
        "status": "Pending",
        "visible_to": null,
        "created_at": "07-08-2024 18:31:28",
        "updated_at": "07-08-2024 18:31:28"
    }
}
 

Example response (422):


{
    "error": true,
    "message": "Validation errors occurred",
    "errors": {
        "id": [
            "The id field is required.",
            "The selected id is invalid."
        ],
        "reason": [
            "The reason field is required."
        ],
        "from_date": [
            "The from date field is required."
        ],
        "to_date": [
            "The to date field is required."
        ],
        "from_time": [
            "The from time field is required when partial leave is checked."
        ],
        "to_time": [
            "The to time field is required when partial leave is checked."
        ]
    }
}
 

Example response (500):


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

Request      

POST api/leave-requests/update

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

Content-Type      

Example: application/json

Body Parameters

id   integer   

The ID of the leave request to be updated. Example: 1

reason   string   

The reason for the leave. Example: Family function

from_date   date   

The start date of the leave in the format specified in the general settings. Example: 2024-08-05

to_date   date   

The end date of the leave in the format specified in the general settings. Example: 2024-08-01

from_time   time  optional  

required_if:partialLeave,on The start time of the leave in HH:MM format. Example: 09:00

to_time   time  optional  

required_if:partialLeave,on The end time of the leave in HH:MM format. Example: 17:00

status   string  optional  

nullable The status of the leave request. Can be 'pending', 'approved', or 'rejected'. Example: pending

leaveVisibleToAll   string  optional  

optional Set to 'on' if the leave should be visible to all users in the workspace. Example: on

visible_to_ids   string[]  optional  

nullable The IDs of users who can see the leave if it is not visible to all.

partialLeave   string  optional  

optional Set to 'on' if the leave is partial (specific times within a day). Example: on

comment   string  optional  

optional An optional comment that can only be set by admin or leave editor. Example: Approved due to exceptional circumstances

Remove the specified leave request.

requires authentication

This endpoint deletes a leave request item based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/leave-requests/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/leave-requests/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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 (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the leave request."
}
 

Request      

DELETE api/leave-requests/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the leave request to be deleted. Example: 1

Notification Management

List or search notifications.

requires authentication

This endpoint retrieves a list of notifications based on various filters. The user must be authenticated to perform this action. The request allows filtering by status, type, user, client, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/notifications/1?search=Alert&sort=title&order=ASC&status=unread&type=project&user_id=1&client_id=5&notification_type=system&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/notifications/1"
);

const params = {
    "search": "Alert",
    "sort": "title",
    "order": "ASC",
    "status": "unread",
    "type": "project",
    "user_id": "1",
    "client_id": "5",
    "notification_type": "system",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Notifications retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 116,
            "title": "Task Status Updated",
            "users": [
                {
                    "id": 183,
                    "first_name": "Girish",
                    "last_name": "Thacker",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
                }
            ],
            "clients": [
                {
                    "id": 102,
                    "first_name": "Test",
                    "last_name": "Client",
                    "photo": "https://test-taskify.infinitietech.com/storage/photos/no-image.jpg"
                }
            ],
            "type": "Task",
            "type_id": 268,
            "message": "Madhavan Vaidya has updated the status of task sdff, ID:#268, from Default to Test From Pro.",
            "status": "Unread",
            "read_at": null,
            "created_at": "23-07-2024 17:50:09",
            "updated_at": "23-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Request      

GET api/notifications/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the meeting to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter notifications by title, message and id. Example: Alert

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, title, message, type, status, created_at, and updated_at. Example: title

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

status   string  optional  

optional The status of the notification to filter by. Can be "read" or "unread". Example: unread

type   string  optional  

optional The type of notifications to filter by. Example: project

user_id   integer  optional  

optional The user ID to filter notifications by. Example: 1

client_id   integer  optional  

optional The client ID to filter notifications by. Example: 5

notification_type   string  optional  

optional The notification type to filter by. Can be "system" or "push". Example: system

limit   integer  optional  

optional The number of notifications per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Example: 0

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/notifications/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/notifications/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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/notifications/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the notification to be deleted. Example: 1

Mark notification(s) as read.

requires authentication

This endpoint marks a specific notification as read if a notification ID is provided. If no ID is provided, it will mark all unread notifications as read for the authenticated user. The user must be authenticated to perform this action.

Example request:
curl --request PATCH \
    "http://localhost:8000/api/notifications/mark-as-read/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/notifications/mark-as-read/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Notification marked as read successfully."
}
 

Example response (200):


{
    "error": false,
    "message": "All notifications marked as read successfully."
}
 

Example response (404):


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

Example response (500):


{
    "error": true,
    "message": "Failed to mark notifications as read."
}
 

Request      

PATCH api/notifications/mark-as-read/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the notification to mark as read. Example: 1

Activity Log Management

List or search activity logs.

requires authentication

This endpoint retrieves a list of activity logs based on various filters. The user must be authenticated to perform this action. The request allows filtering by date ranges, user, client, activity type, and other parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/activity-log/1?search=update&sort=created_at&order=ASC&date_from=2024-01-01&date_to=2024-12-31&user_id=1&client_id=5&activity=update&type=task&type_id=10&limit=10&offset=0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/activity-log/1"
);

const params = {
    "search": "update",
    "sort": "created_at",
    "order": "ASC",
    "date_from": "2024-01-01",
    "date_to": "2024-12-31",
    "user_id": "1",
    "client_id": "5",
    "activity": "update",
    "type": "task",
    "type_id": "10",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Activity logs retrieved successfully",
    "total": 1,
    "data": [
        {
            "id": 974,
            "actor_id": 183,
            "actor_name": "Girish Thacker",
            "actor_type": "User",
            "type_id": 31,
            "parent_type_id": "",
            "type": "Payslip",
            "parent_type": "",
            "type_title": "CTR-31",
            "parent_type_title": "",
            "activity": "Created",
            "message": "Girish Thacker created payslip PSL-31",
            "created_at": "06-08-2024 18:10:41",
            "updated_at": "06-08-2024 18:10:41"
        }
    ]
}
 

Example response (200):


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

Request      

GET api/activity-log/{id?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the activity log to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter activity logs. Example: update

sort   string  optional  

optional The field to sort by. Defaults to "id". Sortable fields include: id, created_at, and updated_at. Example: created_at

order   string  optional  

optional The sort order, either "ASC" or "DESC". Defaults to "DESC". Example: ASC

date_from   string  optional  

optional The start date range's start in YYYY-MM-DD format. Example: 2024-01-01

date_to   string  optional  

optional The end date range's end in YYYY-MM-DD format. Example: 2024-12-31

user_id   integer  optional  

optional The user ID to filter activity logs by. Example: 1

client_id   integer  optional  

optional The client ID to filter activity logs by. Example: 5

activity   string  optional  

optional The activity type to filter by. Example: update

type   string  optional  

optional The type of activity to filter by. Example: task

type_id   integer  optional  

optional The type ID to filter activity logs by. Example: 10

limit   integer  optional  

optional The number of logs per page for pagination. Example: 10

offset   integer  optional  

optional The offset for pagination. Example: 0

Remove the specified activity log.

requires authentication

This endpoint deletes a activity log based on the provided ID. The user must be authenticated to perform this action.

Example request:
curl --request DELETE \
    "http://localhost:8000/api/activity-log/destroy/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/activity-log/destroy/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Record deleted successfully.",
    "title": null,
    "data": []
}
 

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while deleting the activity log."
}
 

Request      

DELETE api/activity-log/destroy/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer   

The ID of the activity log to be deleted. Example: 1

Role/Permission Management

List or search roles.

This endpoint retrieves a list of roles based on various filters. The request allows filtering by search term and pagination parameters.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/roles/1?search=Admin&sort=name&order=asc&limit=10&offset=0" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/roles/1"
);

const params = {
    "search": "Admin",
    "sort": "name",
    "order": "asc",
    "limit": "10",
    "offset": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Roles retrieved successfully.",
    "total": 1,
    "data": [
        {
            "id": 1,
            "name": "Admin",
            "guard_name": "web",
            "created_at": "10-10-2023 17:50:09",
            "updated_at": "23-07-2024 19:08:16"
        }
    ]
}
 

Example response (200):


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

Example response (200):


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

Example response (500):


{
    "error": true,
    "message": "An error occurred while retrieving the roles."
}
 

Request      

GET api/roles/{id?}

Headers

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

id   integer  optional  

optional The ID of the role to retrieve. Example: 1

Query Parameters

search   string  optional  

optional The search term to filter roles by id, name or guard_name. Example: Admin

sort   string  optional  

optional The field to sort by. all fields are sortable. Defaults to "created_at". Example: name

order   string  optional  

optional The sort order, either "asc" or "desc". Defaults to "desc". Example: asc

limit   integer  optional  

optional The number of roles per page for pagination. Defaults to 10. Example: 10

offset   integer  optional  

optional The offset for pagination, indicating the starting point of results. Defaults to 0. Example: 0

Check user permissions.

requires authentication

This endpoint checks the module-wise permissions assigned to the authenticated user. If a specific permission is provided in the URL, it checks only that permission for the authenticated user. Otherwise, it returns all permissions for the authenticated user.

Example request:
curl --request GET \
    --get "http://localhost:8000/api/permissions/&quot;edit-post&quot;

Here is the module-wise permissions list.

Activity Log:
- manage_activity_log
- delete_activity_log

Allowances:
- create_allowances
- manage_allowances
- edit_allowances
- delete_allowances

Clients:
- create_clients
- manage_clients
- edit_clients
- delete_clients

Contract Types:
- create_contract_types
- manage_contract_types
- edit_contract_types
- delete_contract_types

Contracts:
- create_contracts
- manage_contracts
- edit_contracts
- delete_contracts

Deductions:
- create_deductions
- manage_deductions
- edit_deductions
- delete_deductions

Estimates/Invoices:
- create_estimates_invoices
- manage_estimates_invoices
- edit_estimates_invoices
- delete_estimates_invoices

Expense Types:
- create_expense_types
- manage_expense_types
- edit_expense_types
- delete_expense_types

Expenses:
- create_expenses
- manage_expenses
- edit_expenses
- delete_expenses

Items:
- create_items
- manage_items
- edit_items
- delete_items

Media:
- create_media
- manage_media
- delete_media

Meetings:
- create_meetings
- manage_meetings
- edit_meetings
- delete_meetings

Milestones:
- create_milestones
- manage_milestones
- edit_milestones
- delete_milestones

Payment Methods:
- create_payment_methods
- manage_payment_methods
- edit_payment_methods
- delete_payment_methods

Payments:
- create_payments
- manage_payments
- edit_payments
- delete_payments

Payslips:
- create_payslips
- manage_payslips
- edit_payslips
- delete_payslips

Priorities:
- create_priorities
- manage_priorities
- edit_priorities
- delete_priorities

Projects:
- create_projects
- manage_projects
- edit_projects
- delete_projects

Statuses:
- create_statuses
- manage_statuses
- edit_statuses
- delete_statuses

System Notifications:
- manage_system_notifications
- delete_system_notifications

Tags:
- create_tags
- manage_tags
- edit_tags
- delete_tags

Tasks:
- create_tasks
- manage_tasks
- edit_tasks
- delete_tasks

Taxes:
- create_taxes
- manage_taxes
- edit_taxes
- delete_taxes

Timesheet:
- create_timesheet
- manage_timesheet
- delete_timesheet

Units:
- create_units
- manage_units
- edit_units
- delete_units

Users:
- create_users
- manage_users
- edit_users
- delete_users

Workspaces:
- create_workspaces
- manage_workspaces
- edit_workspaces
- delete_workspaces" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/permissions/&quot;edit-post&quot;

Here is the module-wise permissions list.

Activity Log:
- manage_activity_log
- delete_activity_log

Allowances:
- create_allowances
- manage_allowances
- edit_allowances
- delete_allowances

Clients:
- create_clients
- manage_clients
- edit_clients
- delete_clients

Contract Types:
- create_contract_types
- manage_contract_types
- edit_contract_types
- delete_contract_types

Contracts:
- create_contracts
- manage_contracts
- edit_contracts
- delete_contracts

Deductions:
- create_deductions
- manage_deductions
- edit_deductions
- delete_deductions

Estimates/Invoices:
- create_estimates_invoices
- manage_estimates_invoices
- edit_estimates_invoices
- delete_estimates_invoices

Expense Types:
- create_expense_types
- manage_expense_types
- edit_expense_types
- delete_expense_types

Expenses:
- create_expenses
- manage_expenses
- edit_expenses
- delete_expenses

Items:
- create_items
- manage_items
- edit_items
- delete_items

Media:
- create_media
- manage_media
- delete_media

Meetings:
- create_meetings
- manage_meetings
- edit_meetings
- delete_meetings

Milestones:
- create_milestones
- manage_milestones
- edit_milestones
- delete_milestones

Payment Methods:
- create_payment_methods
- manage_payment_methods
- edit_payment_methods
- delete_payment_methods

Payments:
- create_payments
- manage_payments
- edit_payments
- delete_payments

Payslips:
- create_payslips
- manage_payslips
- edit_payslips
- delete_payslips

Priorities:
- create_priorities
- manage_priorities
- edit_priorities
- delete_priorities

Projects:
- create_projects
- manage_projects
- edit_projects
- delete_projects

Statuses:
- create_statuses
- manage_statuses
- edit_statuses
- delete_statuses

System Notifications:
- manage_system_notifications
- delete_system_notifications

Tags:
- create_tags
- manage_tags
- edit_tags
- delete_tags

Tasks:
- create_tasks
- manage_tasks
- edit_tasks
- delete_tasks

Taxes:
- create_taxes
- manage_taxes
- edit_taxes
- delete_taxes

Timesheet:
- create_timesheet
- manage_timesheet
- delete_timesheet

Units:
- create_units
- manage_units
- edit_units
- delete_units

Users:
- create_users
- manage_users
- edit_users
- delete_users

Workspaces:
- create_workspaces
- manage_workspaces
- edit_workspaces
- delete_workspaces"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Permissions check completed.",
    "data": {
        "permissions": {
            "create_projects": true,
            "manage_projects": false,
            ...
        }
    }
}
 

Example response (500):


{
    "error": true,
    "message": "An error occurred while checking the permission."
}
 

Request      

GET api/permissions/{permission?}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

URL Parameters

permission   string  optional  

optional The specific permission to check. Example: `"edit-post"

Here is the module-wise permissions list.

Activity Log:

  • manage_activity_log
  • delete_activity_log

Allowances:

  • create_allowances
  • manage_allowances
  • edit_allowances
  • delete_allowances

Clients:

  • create_clients
  • manage_clients
  • edit_clients
  • delete_clients

Contract Types:

  • create_contract_types
  • manage_contract_types
  • edit_contract_types
  • delete_contract_types

Contracts:

  • create_contracts
  • manage_contracts
  • edit_contracts
  • delete_contracts

Deductions:

  • create_deductions
  • manage_deductions
  • edit_deductions
  • delete_deductions

Estimates/Invoices:

  • create_estimates_invoices
  • manage_estimates_invoices
  • edit_estimates_invoices
  • delete_estimates_invoices

Expense Types:

  • create_expense_types
  • manage_expense_types
  • edit_expense_types
  • delete_expense_types

Expenses:

  • create_expenses
  • manage_expenses
  • edit_expenses
  • delete_expenses

Items:

  • create_items
  • manage_items
  • edit_items
  • delete_items

Media:

  • create_media
  • manage_media
  • delete_media

Meetings:

  • create_meetings
  • manage_meetings
  • edit_meetings
  • delete_meetings

Milestones:

  • create_milestones
  • manage_milestones
  • edit_milestones
  • delete_milestones

Payment Methods:

  • create_payment_methods
  • manage_payment_methods
  • edit_payment_methods
  • delete_payment_methods

Payments:

  • create_payments
  • manage_payments
  • edit_payments
  • delete_payments

Payslips:

  • create_payslips
  • manage_payslips
  • edit_payslips
  • delete_payslips

Priorities:

  • create_priorities
  • manage_priorities
  • edit_priorities
  • delete_priorities

Projects:

  • create_projects
  • manage_projects
  • edit_projects
  • delete_projects

Statuses:

  • create_statuses
  • manage_statuses
  • edit_statuses
  • delete_statuses

System Notifications:

  • manage_system_notifications
  • delete_system_notifications

Tags:

  • create_tags
  • manage_tags
  • edit_tags
  • delete_tags

Tasks:

  • create_tasks
  • manage_tasks
  • edit_tasks
  • delete_tasks

Taxes:

  • create_taxes
  • manage_taxes
  • edit_taxes
  • delete_taxes

Timesheet:

  • create_timesheet
  • manage_timesheet
  • delete_timesheet

Units:

  • create_units
  • manage_units
  • edit_units
  • delete_units

Users:

  • create_users
  • manage_users
  • edit_users
  • delete_users

Workspaces:

  • create_workspaces
  • manage_workspaces
  • edit_workspaces
  • delete_workspaces`

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 "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "workspace_id: 1"
const url = new URL(
    "http://localhost:8000/api/settings/general_settings"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "workspace_id": "1",
};

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

Example response (200):


{
    "error": false,
    "message": "Settings retrieved successfully",
    "settings": {
        "company_title": "Taskify",
        "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 (200):


{
    "error": true,
    "message": "Un Authorized Action!"
}
 

Example response (200):


{
    "error": true,
    "message": "Setting not found"
}
 

Request      

GET api/settings/{variable}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Accept      

Example: application/json

workspace_id      

Example: 1

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