Introduction
This is the API documentation for the taskify.
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Endpoints
GET api/estimates-invoices/pdf/{id}
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/estimates-invoices/pdf/alias" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/estimates-invoices/pdf/alias"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "No query results for model [App\\Models\\EstimatesInvoice] alias"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/leave-requests/get-calendar-data
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/leave-requests/get-calendar-data" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leave-requests/get-calendar-data"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"error": false,
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific lead stage.
requires authentication
This endpoint retrieves the details of a specific lead stage by its ID. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-stages/get/5?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/get/5"
);
const params = {
"isApi": "1",
};
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": "Lead stage retrieved successfully!",
"data": {
"id": 5,
"name": "Qualified",
"slug": "qualified",
"color": "info",
"order": 2,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead stage not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead stage."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/custom-fields/{id}/edit
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/custom-fields/2/edit" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/custom-fields/2/edit"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"error": false,
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Password.
This endpoint allows a user or client to reset their password using a valid token.
Example request:
curl --request POST \
"http://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/user" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\phpB29F.tmp" const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/account/destroy" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/dashboard/statistics" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": [
3
],
\"tag_ids\": [
9
],
\"status_ids\": [
7
]
}"
const url = new URL(
"http://127.0.0.1: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": [
3
],
"tag_ids": [
9
],
"status_ids": [
7
]
};
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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/1/favorite" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"is_favorite\": 9
}"
const url = new URL(
"http://127.0.0.1:8000/api/projects/1/favorite"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"is_favorite": 9
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/6/pinned" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"is_pinned\": 2
}"
const url = new URL(
"http://127.0.0.1:8000/api/projects/6/pinned"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"is_pinned": 2
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/18/status" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"statusId\": 9,
\"note\": \"aut\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/projects/18/status"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"statusId": 9,
"note": "aut"
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/9/priority" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"priorityId\": 18
}"
const url = new URL(
"http://127.0.0.1:8000/api/projects/9/priority"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"priorityId": 18
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/3/status-timelines" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/3/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"
},
{
"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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Mind Map Data of a specific project.
requires authentication
This endpoint retrieves mind map data of a specific project by its ID.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/projects/9/mind-map" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/9/mind-map"
);
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,
"data": {
"id": "project_2",
"topic": "hola",
"link": "https://dev-taskify.taskhub.company/projects/information/2",
"isroot": true,
"level": 1,
"children": [
{
"id": "tasks",
"topic": "Tasks",
"level": 2,
"children": [
{
"id": "task_4",
"topic": "Test",
"link": "https://dev-taskify.taskhub.company/tasks/information/4",
"children": [
{
"id": "task_users_4",
"topic": "Users",
"children": [
{
"id": "task_user_4_1",
"topic": "Admin User",
"link": "https://dev-taskify.taskhub.company/users/profile/1"
}
]
},
{
"id": "task_clients_4",
"topic": "Clients",
"children": []
}
]
},
{
"id": "task_5",
"topic": "test",
"link": "https://dev-taskify.taskhub.company/tasks/information/5",
"children": [
{
"id": "task_users_5",
"topic": "Users",
"children": [
{
"id": "task_user_5_1",
"topic": "Admin User",
"link": "https://dev-taskify.taskhub.company/users/profile/1"
}
]
},
{
"id": "task_clients_5",
"topic": "Clients",
"children": []
}
]
},
{
"id": "task_6",
"topic": "test 1",
"link": "https://dev-taskify.taskhub.company/tasks/information/6",
"children": [
{
"id": "task_users_6",
"topic": "Users",
"children": [
{
"id": "task_user_6_1",
"topic": "Admin User",
"link": "https://dev-taskify.taskhub.company/users/profile/1"
}
]
},
{
"id": "task_clients_6",
"topic": "Clients",
"children": []
}
]
}
]
},
{
"id": "users",
"topic": "Users",
"children": [
{
"id": "user_1",
"topic": "Admin User",
"link": "https://dev-taskify.taskhub.company/users/profile/1"
}
]
},
{
"id": "clients",
"topic": "Clients",
"children": []
},
{
"id": "milestones",
"topic": "Milestones",
"children": []
},
{
"id": "media",
"topic": "Media",
"children": []
}
]
}
Example response (404):
{
"error": true,
"message": "Project not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": 5,
\"title\": \"omnis\",
\"status\": \"praesentium\",
\"start_date\": \"adipisci\",
\"end_date\": \"velit\",
\"cost\": \"aperiam\",
\"description\": \"Id dignissimos ullam amet neque quisquam.\"
}"
const url = new URL(
"http://127.0.0.1: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": 5,
"title": "omnis",
"status": "praesentium",
"start_date": "adipisci",
"end_date": "velit",
"cost": "aperiam",
"description": "Id dignissimos ullam amet neque quisquam."
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/milestones/9?search=et&sort=exercitationem&order=tenetur&statuses[]=facere&date_between_from=debitis&date_between_to=aliquid&start_date_from=consequatur&start_date_to=animi&end_date_from=illum&end_date_to=amet&limit=15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/milestones/9"
);
const params = {
"search": "et",
"sort": "exercitationem",
"order": "tenetur",
"statuses[0]": "facere",
"date_between_from": "debitis",
"date_between_to": "aliquid",
"start_date_from": "consequatur",
"start_date_to": "animi",
"end_date_from": "illum",
"end_date_to": "amet",
"limit": "15",
};
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):
{
"data": [
{
"id": 12,
"title": "Design Phase",
"status": Complete,
"progress": "75",
"cost": "₹1,500.00",
"start_date": "2025-03-10",
"end_date": "2025-03-20",
"created_by": "John Doe",
"description": "Initial design phase for the project.",
"created_at": "2025-03-01",
"updated_at": "2025-03-05",
}
],
"total": 1
}
Example response (404):
{
"error": true,
"message": "Project not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/milestones/get/13" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/milestones/get/13"
);
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",
"updated_at": "2025-03-05"
}
}
Example response (404):
{
"error": true,
"message": "Milestone not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": \"aut\",
\"status\": \"pariatur\",
\"start_date\": \"non\",
\"end_date\": \"eligendi\",
\"cost\": \"nulla\",
\"progress\": 2,
\"description\": \"In ut non dolore tempore sunt temporibus.\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/milestones/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "aut",
"status": "pariatur",
"start_date": "non",
"end_date": "eligendi",
"cost": "nulla",
"progress": 2,
"description": "In ut non dolore tempore sunt temporibus."
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/milestones/destroy/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/milestones/destroy/19"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/14/comments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: multipart/form-data" \
--form "model_type=explicabo"\
--form "model_id=16"\
--form "content=quod"\
--form "parent_id=12"\
--form "attachments[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\phpB7C6.tmp" const url = new URL(
"http://127.0.0.1:8000/api/projects/14/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', 'explicabo');
body.append('model_id', '16');
body.append('content', 'quod');
body.append('parent_id', '12');
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/comments/get/9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/comments/get/9"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": 20,
\"content\": \"facilis\"
}"
const url = new URL(
"http://127.0.0.1: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": 20,
"content": "facilis"
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/comments/destroy?comment_id=4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/comments/destroy"
);
const params = {
"comment_id": "4",
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all comments for a project with attachments and children.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/projects/20/comments/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/20/comments/list"
);
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,
"comments": [
{
"id": 1,
"content": "Parent comment",
"attachments": [...],
"children": [
{
"id": 2,
"content": "Reply",
"attachments": [...],
"children": [...]
}
]
}
]
}
Example response (404):
{
"error": true,
"message": "Project not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a comment attachment.
requires authentication
This endpoint deletes a specific attachment belonging to a comment and removes its file from storage. The user must be authenticated and have permission to delete comment attachments.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/projects/comments/destroy-attachment/20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/comments/destroy-attachment/20"
);
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": "Attachment deleted successfully."
}
Example response (404):
{
"error": true,
"message": "Attachment not found."
}
Example response (500):
{
"error": true,
"message": "Attachment couldn't be deleted."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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=18"\
--form "media_files[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\phpB853.tmp" const url = new URL(
"http://127.0.0.1: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', '18');
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/get-media/18?search=vel&sort=fuga&order=ipsam" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/get-media/18"
);
const params = {
"search": "vel",
"sort": "fuga",
"order": "ipsam",
};
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",
"updated_at": "2025-03-03",
}
],
"total": 1
}
Example response (404):
{
"error": true,
"message": "Project not found."
}
Example response (500):
{
"error": true,
"message": "Could not retrieve media files."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/projects/delete-media/dicta" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/projects/delete-media/dicta"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": [
19
],
\"client_ids\": [
15
],
\"priority_ids\": [
16
],
\"project_ids\": [
6
],
\"status_ids\": [
18
]
}"
const url = new URL(
"http://127.0.0.1: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": [
19
],
"client_ids": [
15
],
"priority_ids": [
16
],
"project_ids": [
6
],
"status_ids": [
18
]
};
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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/12/favorite" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"is_favorite\": 18
}"
const url = new URL(
"http://127.0.0.1:8000/api/tasks/12/favorite"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"is_favorite": 18
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/7/pinned" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"is_pinned\": 19
}"
const url = new URL(
"http://127.0.0.1:8000/api/tasks/7/pinned"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"is_pinned": 19
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get task status timeline.
requires authentication
This endpoint retrieves the status change history of a task, sorted in descending order.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/tasks/13/status-timelines" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/13/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"
},
{
"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": "Task not found."
}
Example response (500):
{
"error": true,
"message": "Could not retrieve status timeline."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/porro/comments" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: multipart/form-data" \
--form "model_type=ut"\
--form "model_id=10"\
--form "content=optio"\
--form "parent_id=9"\
--form "attachments[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\phpB9BD.tmp" const url = new URL(
"http://127.0.0.1:8000/api/tasks/porro/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', 'ut');
body.append('model_id', '10');
body.append('content', 'optio');
body.append('parent_id', '9');
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/comments/get/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/comments/get/5"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": 20,
\"content\": \"libero\"
}"
const url = new URL(
"http://127.0.0.1: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": 20,
"content": "libero"
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/tasks/comments/destroy?comment_id=8" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/comments/destroy"
);
const params = {
"comment_id": "8",
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get all comments for a task with attachments and children.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/tasks/4/comments/list" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/4/comments/list"
);
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,
"comments": [
{
"id": 1,
"content": "Parent comment",
"attachments": [...],
"children": [
{
"id": 2,
"content": "Reply",
"attachments": [...],
"children": [...]
}
]
}
]
}
Example response (404):
{
"error": true,
"message": "Project not found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a comment attachment.
requires authentication
This endpoint deletes a specific attachment belonging to a comment and removes its file from storage. The user must be authenticated and have permission to delete comment attachments.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/tasks/comments/destroy-attachment/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/comments/destroy-attachment/19"
);
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": "Attachment deleted successfully."
}
Example response (404):
{
"error": true,
"message": "Attachment not found."
}
Example response (500):
{
"error": true,
"message": "Attachment couldn't be deleted."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Task Media
Upload media files for a task.
requires authentication
This endpoint allows authenticated users to upload media files and associate them with a specific task.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/tasks/upload-media" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: multipart/form-data" \
--form "id=9"\
--form "media_files[]=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\phpBA3B.tmp" const url = new URL(
"http://127.0.0.1:8000/api/tasks/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', '9');
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": [
201,
202
],
"type": "media",
"parent_type": "task",
"parent_id": 15
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred.",
"errors": {
"id": [
"The selected id is invalid."
],
"media_files": [
"The media file must be a valid file."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred during file upload: [error details]"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Task 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://127.0.0.1:8000/api/tasks/get-media/18?search=fuga&sort=minus&order=odit" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/get-media/18"
);
const params = {
"search": "fuga",
"sort": "minus",
"order": "odit",
};
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/task-media/image.jpg' data-lightbox='task-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",
"updated_at": "2025-03-03",
}
],
"total": 1
}
Example response (404):
{
"error": true,
"message": "Task not found."
}
Example response (500):
{
"error": true,
"message": "Could not retrieve media files."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a media file.
requires authentication
This endpoint allows authenticated users to delete a specific media file associated with a task.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/tasks/delete-media/quidem" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/tasks/delete-media/quidem"
);
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": 301,
"title": "document.pdf",
"parent_id": 15,
"type": "media",
"parent_type": "task"
}
Example response (404):
{
"error": true,
"message": "File not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the file."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": \"ut\",
\"color\": \"quo\",
\"role_ids\": [
\"aut\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/status/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "ut",
"color": "quo",
"role_ids": [
"aut"
]
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\": 16,
\"title\": \"veniam\",
\"color\": \"officiis\",
\"role_ids\": [
\"molestiae\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/status/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 16,
"title": "veniam",
"color": "officiis",
"role_ids": [
"molestiae"
]
};
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/status/get/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/status/get/19"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/status/destroy/19" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/status/destroy/19"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new priority.
requires authentication
This endpoint allows authenticated users to create a new priority with a unique slug.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/priority/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"rerum\",
\"color\": \"non\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/priority/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "rerum",
"color": "non"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Priority created successfully.",
"id": 101,
"priority": {
"id": 101,
"title": "High",
"color": "primary",
"slug": "high"
}
}
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": "Priority couldn't be created."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing priority.
requires authentication
This endpoint allows authenticated users to update a priority, including modifying the title and color.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/priority/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 5,
\"title\": \"atque\",
\"color\": \"error\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/priority/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 5,
"title": "atque",
"color": "error"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Priority updated successfully.",
"id": 101
}
Example response (404):
{
"error": true,
"message": "Priority 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": "Priority couldn't be updated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get details of a specific priority.
requires authentication
This endpoint retrieves the details of a specific priority.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/priority/get/9" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/priority/get/9"
);
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": "Priority retrieved successfully.",
"priority": {
"id": 101,
"title": "High",
"color": "#ff0000",
"slug": "high",
"created_at": "2025-03-04 14:00:00",
"updated_at": "2025-03-04 16:00:00"
}
}
Example response (404):
{
"error": true,
"message": "Priority not found."
}
Example response (500):
{
"error": true,
"message": "Could not retrieve priority."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a priority.
requires authentication
This endpoint allows authenticated users to delete a specific priority.
Before deletion, all associated projects and tasks will have their priority_id set to null.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/priority/destroy/11" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/priority/destroy/11"
);
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": "Priority deleted successfully.",
"id": 101,
"title": "High"
}
Example response (404):
{
"error": true,
"message": "Priority not found."
}
Example response (500):
{
"error": true,
"message": "Priority couldn't be deleted."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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.
Create a new tag.
requires authentication
This endpoint creates a new todo item with the specified title, color. The user must be authenticated to perform this action.
Update an existing tag.
requires authentication
This endpoint updates an existing tag item with the specified title, color. The user must be authenticated to perform this action.
Remove the specified tag.
requires authentication
This endpoint deletes a tag item based on the provided ID. The user must be authenticated to perform this action.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\phpB3BA.tmp" const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\phpB3CB.tmp" const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/users/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\phpB439.tmp" const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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\phpB44A.tmp" const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/clients/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/workspaces/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/workspaces/9/default" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"is_default\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/workspaces/9/default"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"is_default": true
};
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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/workspaces/remove-participant" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/meetings/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/todos/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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",
"note_type" : "text|drawing",
"drawing_data":"urlencoded(base64encoded(Svg)),
"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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/notes/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/notifications/1?search=Alert&sort=title&order=ASC&status=unread&type=project&user_id=1&client_id=5¬ification_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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/notifications/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1: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://127.0.0.1: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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/permissions/"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" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/permissions/"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"
);
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."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new role.
requires authentication
This endpoint allows authenticated users to create a new role and assign permissions.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/roles/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"\\\"Supervisor\\\"\",
\"permissions\": [
1,
2,
3
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/roles/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"name": "\"Supervisor\"",
"permissions": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Role created successfully.",
"role": {
"id": 5,
"name": "Supervisor",
"permissions": [
"edit_tasks",
"assign_tasks"
]
}
}
Example response (409):
{
"error": true,
"message": "A role `Manager` already exists."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"name": [
"The name field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the role."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing role.
requires authentication
This endpoint allows authenticated users to update a role name and modify its permissions.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/roles/update/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"\\\"Supervisor\\\"\",
\"permissions\": [
1,
2,
3
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/roles/update/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"name": "\"Supervisor\"",
"permissions": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Role updated successfully."
}
Example response (404):
{
"error": true,
"message": "Role not found."
}
Example response (409):
{
"error": true,
"message": "A role `Manager` already exists."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"name": [
"The name field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the role."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a role.
requires authentication
This endpoint allows authenticated users to delete a specific role.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/roles/destroy/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/roles/destroy/10"
);
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": "Role deleted successfully."
}
Example response (404):
{
"error": true,
"message": "Role not found."
}
Example response (409):
{
"error": true,
"message": "Cannot delete this role because it is assigned to users."
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the role."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a specific role with its permissions, grouped by category.
requires authentication
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/roles/get/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/roles/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,
"role": {
"id": 1,
"name": "Admin",
"permissions": {
"projects": {
"create_projects": true,
"delete_projects": false
},
"tasks": {
"create_tasks": true
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List all permissions.
This endpoint retrieves a list of all permissions.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/permissions-list" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/permissions-list"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Permissions retrieved successfully.",
"total": 5,
"data": [
{
"id": 1,
"name": "create_projects",
"guard_name": "web",
"created_at": "2023-10-10T17:50:09.000000Z",
"updated_at": "2024-07-23T19:08:16.000000Z"
},
...
]
}
Example response (200):
{
"error": true,
"message": "Permissions not found.",
"total": 0,
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the permissions."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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://127.0.0.1:8000/api/settings/general_settings" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1: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": "FortyHives Projects",
"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"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store the settings for a specific variable.
requires authentication
This endpoint stores the settings for a given variable. The user must be authenticated.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/settings/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"variable\": \"general_settings\",
\"company_title\": \"FortyHives Projects\",
\"site_url\": \"https:\\/\\/www.taskify.com\",
\"timezone\": \"Asia\\/Kolkata\",
\"currency_full_form\": \"Indian Rupee\",
\"currency_symbol\": \"₹\",
\"currency_code\": \"INR\",
\"date_format\": \"DD-MM-YYYY|d-m-Y\",
\"toast_time_out\": \"2\",
\"allowed_max_upload_size\": \"2000\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/settings/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"variable": "general_settings",
"company_title": "FortyHives Projects",
"site_url": "https:\/\/www.taskify.com",
"timezone": "Asia\/Kolkata",
"currency_full_form": "Indian Rupee",
"currency_symbol": "₹",
"currency_code": "INR",
"date_format": "DD-MM-YYYY|d-m-Y",
"toast_time_out": "2",
"allowed_max_upload_size": "2000"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Settings saved successfully."
}
Example response (200):
{
"error": true,
"message": "Un Authorized Action!"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Expense Management
Create a new expense.
requires authentication
This endpoint creates a new expense item with the specified title, expense_type_id,user_id,amount,expense_date,note. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/expenses/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/expenses/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Expense created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Expense Title',
'expense_type_id' => '1',
'user_id' => '1',
'amount' => '100.00',
'expense_date' => '2023-10-01',
'note' => 'Expense note',
'created_by' => 'John Doe',
'created_at' => format_date($exp->created_at, true),
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"title": [
"The title field is required."
],
"expense_type_id": [
"The expense type field is required."
],
"user_id": [
"The user id field is required."
],
"amount": [
"The amount field is required."
],
"expense_date": [
"The expense date field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the expense."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List or search expenses.
requires authentication
Retrieve a paginated list of expenses or a single expense by ID.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/expenses/1?search=Lunch&sort=title&order=ASC&limit=10&offset=0&type_ids%5B%5D[]=1&type_ids%5B%5D[]=2&user_ids%5B%5D[]=3&user_ids%5B%5D[]=5&date_from=2023-01-01&date_to=2023-01-31" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/expenses/1"
);
const params = {
"search": "Lunch",
"sort": "title",
"order": "ASC",
"limit": "10",
"offset": "0",
"type_ids[][0]": "1",
"type_ids[][1]": "2",
"user_ids[][0]": "3",
"user_ids[][1]": "5",
"date_from": "2023-01-01",
"date_to": "2023-01-31",
};
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": "Expenses retrieved successfully",
"total": 2,
"data": [
{
"id": 1,
"title": "Travel Reimbursement",
"expense_type_id": 2,
"expense_type": "Travel",
"user_id": 5,
"user": {
"id": 5,
"first_name": "Alice",
"last_name": "Smith",
"email": "alice@example.com",
"photo": "https://yourdomain.com/storage/photos/alice.jpg"
},
"amount": "150.00",
"expense_date": "2023-10-01",
"note": "Flight ticket",
"created_by": "John Doe",
"created_at": "2023-10-01"
}
]
}
Example response (404):
{
"error": true,
"message": "Expense not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a existing expense.
requires authentication
This endpoint update existing expense item with the specified title, expense_type_id,user_id,amount,expense_date,note. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/expenses/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\",
\"expense_type_id\": \"1\",
\"user_id\": \"1\",
\"amount\": \"Finish report\",
\"expense_date\": \"2024-08-07\",
\"note\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/expenses/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",
"expense_type_id": "1",
"user_id": "1",
"amount": "Finish report",
"expense_date": "2024-08-07",
"note": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Expense created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Expense Title',
'expense_type_id' => '1',
'user_id' => '1',
'amount' => '100.00',
'expense_date' => '2023-10-01',
'note' => 'Expense note',
'created_by' => 'John Doe',
'created_at' => format_date($exp->created_at, true),
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"title": [
"The title field is required."
],
"expense_type_id": [
"The expense type field is required."
],
"user_id": [
"The user id field is required."
],
"amount": [
"The amount field is required."
],
"expense_date": [
"The expense date field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the expense."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified expense.
requires authentication
This endpoint deletes a expense item based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/expenses/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/expenses/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": "Expense deleted successfully.",
"id": 1,
"title": "Expense Title"
"data": []
}
Example response (200):
{
"error": true,
"message": "Expense not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the expense."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new expense type.
requires authentication
This endpoint creates a new expense type item with the specified title, description. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/expenses/expense-types/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Finish report\",
\"description\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/expenses/expense-types/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Finish report",
"description": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Expense Type created successfully.",
"id": 1,
"data": {
'id' => '1',
'title' => 'Expense Title',
'description' => 'Expense Description',
'created_at' => 2023-10-01 12:00:00',
}
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 expense type."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List or search expense types.
requires authentication
Retrieve a list of expense types, optionally filtered by search term or a specific ID. Supports sorting, pagination, and workspace scoping. Authentication is required.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/expenses/expense-types/list/1?search=Travel&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://127.0.0.1:8000/api/expenses/expense-types/list/1"
);
const params = {
"search": "Travel",
"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, Single Expense Type Found):
{
"error": false,
"message": "Expense type retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"title": "Travel",
"description": "Travel expenses",
"created_at": "2023-10-01"
}
]
}
Example response (200, Multiple Expense Types Found):
{
"error": false,
"message": "Expense types retrieved successfully",
"total": 2,
"data": [
{
"id": 1,
"title": "Travel",
"description": "Travel expenses",
"created_at": "2023-10-01"
},
{
"id": 2,
"title": "Office Supplies",
"description": "Stationery and office supplies",
"created_at": "2023-10-03"
}
]
}
Example response (200, No Results Found):
{
"error": true,
"message": "Expense type not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing expense type.
requires authentication
This endpoint update an existing expense type item with the specified title, description. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/expenses/expense-types/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\",
\"description\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/expenses/expense-types/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",
"description": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Expense Type created successfully.",
"id": 1,
"data": {
'id' => '1',
'title' => 'Expense Title',
'description' => 'Expense Description',
'created_at' => 2023-10-01 12:00:00',
}
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 expense type."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified expense type.
requires authentication
This endpoint deletes a expense type item based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/expenses/expense-types/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/expenses/expense-types/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": "Expense Type deleted successfully.",
"id": 1,
"title": "Expense Type Title"
"data": []
}
Example response (200):
{
"error": true,
"message": "Expense Type not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the expense type."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment Management
Create a new payment.
requires authentication
This endpoint creates a new payment with the specified user_id, invoice_id,payment_method_id,amount,payment_date,note. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payments/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"user_id\": \"1\",
\"invoice_id\": \"1\",
\"payment_method_id\": \"1\",
\"amount\": \"100\",
\"payment_date\": \"2024-08-07\",
\"note\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/payments/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"user_id": "1",
"invoice_id": "1",
"payment_method_id": "1",
"amount": "100",
"payment_date": "2024-08-07",
"note": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payment created successfully.",
"id": 36,
"data": {
'id' => '1',
'user_id' => '1',
'invoice_id' => '1',
'payment_method_id' => '1',
'amount' => '100.00',
'payment_date' => '2023-10-01',
'note' => 'Payment note',
'created_at' => format_date($exp->created_at, true),
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"user_id": [
"The user_id field is required."
],
"invoice_id": [
"The invoice_id field is required."
],
"payment_method_id": [
"The payment method id field is required."
],
"amount": [
"The amount field is required."
],
"payment_date": [
"The payment date field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the payment."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List or search payments.
requires authentication
This endpoint retrieves a list of payments 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://127.0.0.1:8000/api/payments/1?search=Title&sort=id&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://127.0.0.1:8000/api/payments/1"
);
const params = {
"search": "Title",
"sort": "id",
"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": "Payment retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"user_id": 1,
"user": {
"id": 1,
"first_name": "Admin",
"last_name": "User",
"email": "admin@gmail.com",
"photo": "https://dev-taskify.taskhub.company/storage/photos/C03PJmIQInts2j3O2on99Nilu45UcChrepcsIFxO.jpg"
},
"invoice_id": null,
"invoice": "-",
"payment_method_id": 1,
"payment_method": "some",
"amount": "₹ 100.00",
"payment_date": "2025-04-16",
"note": "123",
"created_by": "Admin User",
"created_at": "2025-04-16 09:41:57",
"updated_at": "2025-04-16 09:41:57"
}
]
}
Example response (200):
{
"error": true,
"message": "Payment not found",
"total": 0,
"data": []
}
Example response (200):
{
"error": true,
"message": "Payments not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing payment.
requires authentication
This endpoint updates an existing payment with the specified user_id, invoice_id,payment_method_id,amount,payment_date,note. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payments/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"sunt\",
\"user_id\": \"1\",
\"invoice_id\": \"1\",
\"payment_method_id\": \"1\",
\"amount\": \"100\",
\"payment_date\": \"2024-08-07\",
\"note\": \"Finish report\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/payments/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "sunt",
"user_id": "1",
"invoice_id": "1",
"payment_method_id": "1",
"amount": "100",
"payment_date": "2024-08-07",
"note": "Finish report"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payment created successfully.",
"id": 36,
"data": {
'id' => '1',
'user_id' => '1',
'invoice_id' => '1',
'payment_method_id' => '1',
'amount' => '100.00',
'payment_date' => '2023-10-01',
'note' => 'Payment note',
'created_at' => format_date($exp->created_at, true),
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"user_id": [
"The user_id field is required."
],
"invoice_id": [
"The invoice_id field is required."
],
"payment_method_id": [
"The payment method id field is required."
],
"amount": [
"The amount field is required."
],
"payment_date": [
"The payment date field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the payment."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified payment.
requires authentication
This endpoint deletes a payment based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/payments/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/payments/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": "Payment deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Payment not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Payment."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payment Method Management
List or search payments methods.
requires authentication
This endpoint retrieves a list of payments methods 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://127.0.0.1:8000/api/payment-methods/1?search=Title&sort=id&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://127.0.0.1:8000/api/payment-methods/1"
);
const params = {
"search": "Title",
"sort": "id",
"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": "Payment Method retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"title": "Payment Method Title",
"created_at": "2025-04-16 09:41:57",
"updated_at": "2025-04-16 09:41:57"
}
]
}
Example response (200):
{
"error": true,
"message": "Payment Method not found",
"total": 0,
"data": []
}
Example response (200):
{
"error": true,
"message": "Payment Methods not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a payment method.
requires authentication
This endpoint creates a payment method. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payment-methods/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Title\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/payment-methods/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Title"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payment Method created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the payment method."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing payment method.
requires authentication
This endpoint updates an existing payment method with the specified id. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payment-methods/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"recusandae\",
\"title\": \"Title\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/payment-methods/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "recusandae",
"title": "Title"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payment Method created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the payment method."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified payment method.
requires authentication
This endpoint deletes a payment method based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/payment-methods/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/payment-methods/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": "Payment Method deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Payment Method not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Payment Method."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Tax Management
List or search taxes.
requires authentication
This endpoint retrieves a list of taxes based on various filters. The user must be authenticated to perform this action. It supports searching, sorting, filtering by type, and pagination.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/taxes/1?search=GST&sort=created_at&order=ASC&types[]=percentage&limit=10&offset=0" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/taxes/1"
);
const params = {
"search": "GST",
"sort": "created_at",
"order": "ASC",
"types[0]": "percentage",
"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": "Taxes retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"title": "GST",
"type": "percentage",
"amount": null,
"percentage": 18,
"created_at": "2025-04-16",
"updated_at": "2025-04-16"
}
]
}
Example response (200):
{
"error": false,
"message": "Tax retrieved successfully",
"total": 1,
"data": {
"id": 1,
"title": "GST",
"type": "percentage",
"amount": null,
"percentage": 18,
"created_at": "2025-04-16",
"updated_at": "2025-04-16"
}
}
Example response (200):
{
"error": true,
"message": "Tax not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a tax.
requires authentication
This endpoint creates a tax. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/taxes/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Title\",
\"type\": \"amount\",
\"amount\": \"100\",
\"percentage\": \"10\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/taxes/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Title",
"type": "amount",
"amount": "100",
"percentage": "10"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Tax created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'type' => 'amount',
'amount' => '100',
'percentage' => null,
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
"type": [
"The type field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the tax."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a tax.
requires authentication
This endpoint updates an existing tax. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/taxes/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"1\",
\"title\": \"Title\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/taxes/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "1",
"title": "Title"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Tax updated successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'type' => 'amount',
'amount' => '100',
'percentage' => null,
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the tax."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified tax.
requires authentication
This endpoint deletes a tax based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/taxes/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/taxes/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": "Tax deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Tax not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Tax."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Unit Management
List or search units.
requires authentication
This endpoint retrieves a list of units 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://127.0.0.1:8000/api/units/1?search=Title&sort=id&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://127.0.0.1:8000/api/units/1"
);
const params = {
"search": "Title",
"sort": "id",
"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": "Unit retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"title": "title",
"description": "unit description",
"created_at": "2025-04-16 09:41:57",
"updated_at": "2025-04-16 09:41:57"
}
]
}
Example response (200):
{
"error": true,
"message": "Unit not found",
"total": 0,
"data": []
}
Example response (200):
{
"error": true,
"message": "Units not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an unit.
requires authentication
This endpoint creates an unit. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/units/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Title\",
\"description\": \"amount\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/units/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Title",
"description": "amount"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Unit created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'description' => 'Unit Description',
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
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 unit."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an unit.
requires authentication
This endpoint updates an unit. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/units/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"1\",
\"title\": \"Title\",
\"description\": \"unit description\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/units/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "1",
"title": "Title",
"description": "unit description"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Unit created successfully.",
"id": 36,
"data": {
'id' => '1',
'title' => 'Title',
'description' => 'Unit Description',
'created_at =>'2025-04-16',
'updated_at' =>'2025-04-16',
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The title id is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the unit."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified unit.
requires authentication
This endpoint deletes a unit based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/units/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/units/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": "Unit deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Unit not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Unit."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Item Management
Retrieve a list of items or a specific item.
requires authentication
This endpoint fetches item records associated with the authenticated user's workspace. You can retrieve a single item by its ID or fetch a paginated list using filters such as search terms, sorting, unit filters, and pagination controls.
Filters available:
- search: Filter by title, description, price, unit ID, or item ID (partial match).
- unit_ids: Filter by one or more unit IDs (exact match).
- id: If provided, fetches a single item record with detailed fields.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/items/5?search=Water+Bottle&sort=title&order=ASC&unit_ids[]=1&unit_ids[]=2&unit_ids[]=3&limit=15&offset=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/items/5"
);
const params = {
"search": "Water Bottle",
"sort": "title",
"order": "ASC",
"unit_ids[0]": "1",
"unit_ids[1]": "2",
"unit_ids[2]": "3",
"limit": "15",
"offset": "20",
};
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": "Items Retrieved Successfully",
"total": 2,
"data": [
{
"id": 1,
"title": "Notebook",
"price": "₹100.00",
"unit_id": 2,
"unit_name": "Piece",
"description": "A ruled notebook",
"created_at": "2025-05-01",
"updated_at": "2025-05-04"
},
...
]
}
Example response (200):
{
"error": false,
"message": "Item Retrieved Successfully",
"total": 1,
"data": {
"id": 1,
"title": "Notebook",
"price": "₹100.00",
"unit_id": 2,
"unit_name": "Piece",
"description": "A ruled notebook",
"created_at": "2025-05-01",
"updated_at": "2025-05-04"
}
}
Example response (200):
{
"error": true,
"message": "Item not found",
"total": 0,
"data": []
}
Example response (200):
{
"error": true,
"message": "Items Not Found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create an item.
requires authentication
This endpoint creates an item. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/items/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"1\",
\"title\": \"Title\",
\"description\": \"description\",
\"price\": \"400\",
\"unit_id\": \"4\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/items/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "1",
"title": "Title",
"description": "description",
"price": "400",
"unit_id": "4"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Item created successfully.",
"id": 36,
"data": {
"id": 1,
"title": "title",
"price" : 100,
"unit_id": 1,
"description" : "description",
"created_at": "2025-04-16 09:41:57",
"updated_at": "2025-04-16 09:41:57"
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the item."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an item.
requires authentication
This endpoint updates an item. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/items/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": \"1\",
\"title\": \"Title\",
\"description\": \"description\",
\"price\": \"400\",
\"unit_id\": \"4\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/items/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": "1",
"title": "Title",
"description": "description",
"price": "400",
"unit_id": "4"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Item updated successfully.",
"id": 36,
"data": {
"id": 1,
"title": "title",
"price" : 100,
"unit_id": 1,
"description" : "description",
"created_at": "2025-04-16 09:41:57",
"updated_at": "2025-04-16 09:41:57"
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"id": [
"The id field is required."
],
"title": [
"The title field is required."
],
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the item."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified item.
requires authentication
This endpoint deletes a item based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/items/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/items/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": "Item deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Item not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Item."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Estimate Invoice Management
List or search estimate invoices.
requires authentication
This endpoint retrieves a list of estimate invoices 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://127.0.0.1:8000/api/estimates-invoices?search=INVC-1001&sort=id&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://127.0.0.1:8000/api/estimates-invoices"
);
const params = {
"search": "INVC-1001",
"sort": "id",
"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": "Estimate invoice retrieved successfully",
"total": 1,
"data": [
{
"id": 1,
"client": {
"id": 2,
"name": "John Doe",
"email": "client@example.com",
"photo": "https://example.com/storage/photos/client.jpg"
},
"total": "₹ 1,000.00",
"status": "Pending",
"due_date": "2025-04-30",
"created_by": "Admin User",
"created_at": "2025-04-15",
"updated_at": "2025-04-15"
}
]
}
Example response (200):
{
"error": true,
"message": "Estimate invoice not found",
"total": 0,
"data": []
}
Example response (200):
{
"error": true,
"message": "Estimate invoices not found",
"total": 0,
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Store a new invoice or estimate.
requires authentication
This endpoint allows the creation of a new invoice or estimate by providing details such as client, dates, items, amount, and tax info. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/estimates-invoices/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"type\": \"invoice\",
\"client_id\": 1,
\"name\": \"Website Development\",
\"address\": \"123 Main St.\",
\"city\": \"New York\",
\"state\": \"NY\",
\"country\": \"USA\",
\"zip_code\": \"10001\",
\"phone\": \"+1234567890\",
\"note\": \"Handle with urgency\",
\"personal_note\": \"Discussed pricing\",
\"from_date\": \"2024-01-01\",
\"to_date\": \"2024-01-31\",
\"status\": \"draft\",
\"total\": \"1000.00\",
\"tax_amount\": \"100.00\",
\"final_total\": \"1100.00\",
\"item_ids\": [
1,
2
],
\"item\": [
1,
2
],
\"quantity\": [
2,
1
],
\"unit\": [
1,
2
],
\"rate\": [
\"500.00\",
\"1000.00\"
],
\"tax\": [
1,
2
],
\"amount\": [
\"1000.00\",
\"1000.00\"
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/estimates-invoices/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"type": "invoice",
"client_id": 1,
"name": "Website Development",
"address": "123 Main St.",
"city": "New York",
"state": "NY",
"country": "USA",
"zip_code": "10001",
"phone": "+1234567890",
"note": "Handle with urgency",
"personal_note": "Discussed pricing",
"from_date": "2024-01-01",
"to_date": "2024-01-31",
"status": "draft",
"total": "1000.00",
"tax_amount": "100.00",
"final_total": "1100.00",
"item_ids": [
1,
2
],
"item": [
1,
2
],
"quantity": [
2,
1
],
"unit": [
1,
2
],
"rate": [
"500.00",
"1000.00"
],
"tax": [
1,
2
],
"amount": [
"1000.00",
"1000.00"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Estimate/Invoice created successfully.",
"data": {
"id": 1,
"type": "invoice",
"client_id": 1,
"from_date": "2024-01-01",
"to_date": "2024-01-31",
"total": "1000.00",
"tax_amount": "100.00",
"final_total": "1100.00",
"status": "draft",
"created_at": "2024-01-01T10:00:00.000000Z",
"items": [...]
}
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred",
"errors": {
"type": [
"The type field is required."
],
"client_id": [
"The client field is required."
],
"from_date": [
"The from date field is required and must be before the to date."
],
"to_date": [
"The to date field is required and must be after the from date."
],
"final_total": [
"The final total field is required and must be a valid currency format."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the estimate/invoice."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing estimate or invoice.
requires authentication
This endpoint updates an existing estimate or invoice record with provided details including type, client, date range, financials, items, and notes. The request must be authenticated.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/estimates-invoices/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 5,
\"type\": \"invoice\",
\"client_id\": 2,
\"name\": \"Invoice April 2024\",
\"address\": \"123 Main St\",
\"city\": \"New York\",
\"state\": \"NY\",
\"country\": \"USA\",
\"zip_code\": \"10001\",
\"phone\": \"+1 1234567890\",
\"note\": \"Payment due within 15 days\",
\"personal_note\": \"Send reminder after 10 days\",
\"from_date\": \"2024-04-01\",
\"to_date\": \"2024-04-30\",
\"status\": \"due\",
\"total\": \"1000.00\",
\"tax_amount\": \"100.00\",
\"final_total\": \"1100.00\",
\"item\": [
1,
2,
3
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/estimates-invoices/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 5,
"type": "invoice",
"client_id": 2,
"name": "Invoice April 2024",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"country": "USA",
"zip_code": "10001",
"phone": "+1 1234567890",
"note": "Payment due within 15 days",
"personal_note": "Send reminder after 10 days",
"from_date": "2024-04-01",
"to_date": "2024-04-30",
"status": "due",
"total": "1000.00",
"tax_amount": "100.00",
"final_total": "1100.00",
"item": [
1,
2,
3
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Estimate/Invoice updated successfully.",
"data": {
"id": 5,
"type": "invoice",
"client_id": 2,
"from_date": "2024-04-01",
"to_date": "2024-04-30",
"total": "1000.00",
"tax_amount": "100.00",
"final_total": "1100.00"
}
}
Example response (422):
{
"error": true,
"message": "Validation errors occurred.",
"errors": {
"client_id": [
"The client field is required."
],
"from_date": [
"The from date must be a valid date."
],
"to_date": [
"The to date must be a valid date."
],
"total": [
"The total format is invalid."
],
"final_total": [
"The final total format is invalid."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the estimate or invoice."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified estimate invoice.
requires authentication
This endpoint deletes a estimate invoice based on the provided ID. The user must be authenticated to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/estimates-invoices/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/estimates-invoices/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": "Estimate Invoice deleted successfully.",
"id": 1,
"data": []
}
Example response (200):
{
"error": true,
"message": "Estimate Invoice not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the Estimate Invoice."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Allowance Management
Create a new allowance.
requires authentication
This endpoint creates a new allowance with the given title and amount. The user must be authenticated to perform this action. The request can be made via API or non-API calls, with an optional isApi parameter to format the response accordingly.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/allowances/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Transport Allowance\",
\"amount\": \"1500.00\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/allowances/store"
);
const params = {
"isApi": "1",
};
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 = {
"title": "Transport Allowance",
"amount": "1500.00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Allowance created successfully.",
"data": {
"id": 6,
"title": "Transport Allowance",
"amount": "$1,500.00",
"created_at": "01 Dec 2024",
"updated_at": "15:45:22"
}
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"title": [
"The title field is required."
],
"amount": [
"The amount format is invalid."
]
}
}
Example response (500):
{
"error": true,
"message": "Allowance couldn't created.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing allowance.
requires authentication
This endpoint allows you to update the title and amount of an existing allowance. The user must be authenticated and authorized to perform this action. The title must remain unique across all allowances. The request can be made via API or non-API calls, with an optional isApi parameter to format the response accordingly.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/allowances/update?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 5,
\"title\": \"Housing Allowance\",
\"amount\": \"1200.00\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/allowances/update"
);
const params = {
"isApi": "1",
};
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 = {
"id": 5,
"title": "Housing Allowance",
"amount": "1200.00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Allowance updated successfully.",
"data": {
"id": 5,
"title": "Housing Allowance",
"amount": "$1,200.00",
"created_at": "01 Dec 2024",
"updated_at": "16:30:45"
}
}
Example response (404):
{
"error": true,
"message": "Allowance not found!",
"data": []
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"title": [
"The title has already been taken."
],
"amount": [
"The amount format is invalid."
]
}
}
Example response (500):
{
"error": true,
"message": "Allowance couldn't updated.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get allowances list
requires authentication
This endpoint returns a filtered and limited list of allowances, specifically formatted for API use. The user must be authenticated to perform this action. This endpoint provides search, sort, and limit functionality optimized for API consumers.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/allowances/list?search=Bonus&sort=amount&order=ASC&limit=5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/allowances/list"
);
const params = {
"search": "Bonus",
"sort": "amount",
"order": "ASC",
"limit": "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": "Allowances retrieved successfully.",
"total": 2,
"data": [
{
"id": 1,
"title": "Bonus",
"amount": "$500.00",
"created_at": "01 Dec 2024",
"updated_at": "10:30:15"
},
{
"id": 2,
"title": "Medical",
"amount": "$300.00",
"created_at": "01 Dec 2024",
"updated_at": "11:45:22"
}
]
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve an allowance's details.
requires authentication
This endpoint fetches detailed information about a specific allowance by its ID. The user must be authenticated to perform this action. The request can be made via API or non-API calls, with an optional isApi parameter to format the response accordingly.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/allowances/get/5?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/allowances/get/5"
);
const params = {
"isApi": "1",
};
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": "Allowance retrieved successfully.",
"data": {
"id": 5,
"title": "Fuel Allowance",
"amount": "$200.00",
"created_at": "01 Dec 2024",
"updated_at": "10:30:15"
}
}
Example response (404):
{
"error": true,
"message": "Allowance not found!",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an allowance.
requires authentication
This endpoint deletes a specific allowance by its ID and automatically detaches any related payslips. The user must be authenticated and authorized to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/allowances/destroy/7" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/allowances/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": "Allowance deleted successfully.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Allowance not found!",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Candidate Management
Create a new candidate.
requires authentication
This endpoint creates a new candidate record with optional file attachments. The user must be authenticated to perform this action. The request validates candidate details and ensures the email is unique.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"+1234567890\",
\"position\": \"Software Engineer\",
\"source\": \"LinkedIn\",
\"status_id\": 1,
\"attachments\": null
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate/store"
);
const params = {
"isApi": "1",
};
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 = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status_id": 1,
"attachments": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"error": false,
"message": "Candidate Created Successfully!",
"data": {
"id": 101,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status_id": 1,
"created_at": "2025-05-15 15:55:00"
}
}
Example response (422):
{
"error": true,
"message": "A candidate with this email already exists."
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the candidate."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a candidate's details.
requires authentication
This endpoint updates the details of an existing candidate, with optional file attachments. The user must be authenticated to perform this action. The request validates candidate details and ensures the email remains unique.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate/update/101?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"+1234567890\",
\"position\": \"Software Engineer\",
\"source\": \"LinkedIn\",
\"status_id\": 1,
\"attachments\": null
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate/update/101"
);
const params = {
"isApi": "1",
};
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 = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status_id": 1,
"attachments": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Candidate Created Successfully!",
"data": {
"id": 101,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status_id": 1,
"updated_at": "2025-05-15 16:00:00"
}
}
Example response (404):
{
"error": true,
"message": "Candidate not found"
}
Example response (422):
{
"error": true,
"message": "The email field must be a valid email address."
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the candidate."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a candidate's status.
requires authentication
This endpoint updates the status of a specific candidate. The user must be authenticated to perform this action. The request requires a valid status ID.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate/101/update_status?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"status_id\": 2
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/update_status"
);
const params = {
"isApi": "1",
};
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 = {
"status_id": 2
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Candidate Status Updated Successfully!",
"data": []
}
Example response (404):
{
"error": true,
"message": "Candidate not found"
}
Example response (422):
{
"error": true,
"message": "The status_id field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the candidate status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a candidate.
requires authentication
This endpoint deletes a specific candidate record. The user must be authenticated and have appropriate permissions to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/candidate/destroy/101" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/destroy/101"
);
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": "Candidate deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Candidate not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the candidate."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List candidates or retrieve a single candidate.
requires authentication
This endpoint retrieves a paginated list of candidates or a single candidate by ID, with optional search, sorting, and status filtering. The user must be authenticated to perform this action. The response includes permission details for editing and deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/list/101?search=John&sort=newest&limit=20&offset=10&candidate_status[]=1&candidate_status[]=2" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/list/101"
);
const params = {
"search": "John",
"sort": "newest",
"limit": "20",
"offset": "10",
"candidate_status[0]": "1",
"candidate_status[1]": "2",
};
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": "Candidates retrieved successfully.",
"total": 50,
"data": [
{
"id": 101,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status": {
"id": 1,
"name": "Applied"
},
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
Example response (404):
{
"error": true,
"message": "Candidate not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a candidate's interview details.
requires authentication
This endpoint fetches the interview details for a specific candidate, including a rendered HTML partial for display. The user must be authenticated to perform this action. The request can be made via API or non-API calls, with an optional isApi parameter to format the response.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/101/interviews?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/interviews"
);
const params = {
"isApi": "1",
};
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": "Interview details retrieved successfully!",
"data": {
"candidate": {
"id": 101,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status_id": 1
},
"html": "<div>...</div>"
}
}
Example response (400):
{
"error": true,
"message": "Invalid candidate ID!",
"data": []
}
Example response (404):
{
"error": true,
"message": "Candidate not found!",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred!",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload attachments for a candidate.
requires authentication
This endpoint allows uploading one or more files as attachments for a specific candidate. The user must be authenticated to perform this action. The files must be of allowed types (PDF, DOC, DOCX, JPG, JPEG, PNG) and within the configured size limit.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate/101/upload-attachment?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"attachments\": null
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/upload-attachment"
);
const params = {
"isApi": "1",
};
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 = {
"attachments": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Files uploaded successfully!",
"data": [
{
"id": 1,
"name": "resume-1623456789_1234.pdf",
"collection_name": "candidate-media",
"mime_type": "application/pdf",
"size": 512
}
]
}
Example response (404):
{
"error": true,
"message": "Candidate not found",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The attachments must be a file of type: pdf, doc, docx, jpg, jpeg, png.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a candidate's attachment.
requires authentication
This endpoint deletes a specific media attachment associated with a candidate. The user must be authenticated and have appropriate permissions to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/candidate/candidate-media/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/candidate-media/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": "Attachment deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Attachment not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the attachment."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List attachments for a candidate.
requires authentication
This endpoint retrieves a paginated list of media attachments for a specific candidate, with optional search, sorting, and pagination parameters. The user must be authenticated to perform this action. The response includes permission details for deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/101/attachments/list?search=resume&sort=name&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/attachments/list"
);
const params = {
"search": "resume",
"sort": "name",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Attachments retrieved successfully.",
"data": {
"total": 2,
"data": [
{
"id": 1,
"name": "resume.pdf",
"mime_type": "application/pdf",
"size": "512.34 KB",
"created_at": "15 May 2025",
"download_url": "https://example.com/candidate/101/attachment/1/download",
"view_url": "https://example.com/candidate/101/attachment/1/view",
"can_delete": true
}
],
"permissions": {
"can_delete": true
}
}
}
Example response (404):
{
"error": true,
"message": "Candidate not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download a candidate's attachment.
requires authentication
This endpoint allows downloading a specific media attachment associated with a candidate. The user must be authenticated to perform this action. The response is a file download stream.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/101/attachment/1/download?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/attachment/1/download"
);
const params = {
"isApi": "1",
};
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):
{
"content_type": "application/pdf",
"disposition": "attachment; filename=resume.pdf"
}
Example response (404):
{
"error": true,
"message": "Candidate not found",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
View a candidate's attachment.
requires authentication
This endpoint allows viewing a specific media attachment associated with a candidate, if the file type is supported (PDF, DOC, DOCX, JPG, JPEG, PNG). The user must be authenticated to perform this action. The response is a file stream for viewable files or an error for unsupported types.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/101/attachment/1/view?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/attachment/1/view"
);
const params = {
"isApi": "1",
};
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):
{
"content_type": "application/pdf",
"disposition": "inline"
}
Example response (404):
{
"error": true,
"message": "Candidate not found",
"data": []
}
Example response (422):
{
"error": true,
"message": "File type not supported for viewing",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a candidate's details.
requires authentication
This endpoint fetches detailed information about a specific candidate, including their status, interviews, and media attachments. The user must be authenticated to perform this action. The request can be made via API or non-API calls, with an optional isApi parameter to format the response accordingly.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate/101/quick-view?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate/101/quick-view"
);
const params = {
"isApi": "1",
};
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": "Candidate details retrieved successfully!",
"data": {
"candidate": {
"id": 101,
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"position": "Software Engineer",
"source": "LinkedIn",
"status": "Applied",
"created_at": "15 May 2025",
"avatar": "https://example.com/storage/candidate-media/avatar.jpg"
},
"attachments": [
{
"id": 1,
"name": "resume.pdf",
"type": "application/pdf",
"size": "512.34 KB",
"created_at": "15 May 2025",
"url": "https://example.com/storage/candidate-media/resume.pdf",
"is_image": false
}
],
"interviews": [
{
"id": 1,
"candidate_name": "John Doe",
"interviewer": "Jane Smith",
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"status": "Scheduled",
"location": "Online",
"mode": "Video",
"created_at": "15 May 2025",
"updated_at": "15 May 2025"
}
]
}
}
Example response (400):
{
"error": true,
"message": "Candidate ID not found.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Candidate not found!",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Candidate Status Management
Create a new candidate status.
requires authentication
This endpoint creates a new candidate status with a specified name and color. The user must be authenticated to perform this action. The status is automatically assigned an order based on the highest existing order plus one.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate_status/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Interviewing\",
\"color\": \"primary\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate_status/store"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Interviewing",
"color": "primary"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"error": false,
"message": "Candidate status retrieved successfully!",
"data": {
"id": 1,
"name": "Interviewing",
"color": "primary",
"order": 1,
"created_at": "2025-05-15 16:11:00",
"updated_at": "2025-05-15 16:11:00"
}
}
Example response (422):
{
"error": true,
"message": "The name field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the candidate status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a candidate status.
requires authentication
This endpoint updates the name and color of an existing candidate status. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate_status/update/1?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Interviewing\",
\"color\": \"success\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate_status/update/1"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Interviewing",
"color": "success"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Candidate status updated successfully!",
"data": {
"id": 1,
"name": "Interviewing",
"color": "success",
"order": 1,
"created_at": "2025-05-15 16:11:00",
"updated_at": "2025-05-15 16:12:00"
}
}
Example response (404):
{
"error": true,
"message": "Candidate status not found"
}
Example response (422):
{
"error": true,
"message": "The name field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the candidate status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a candidate status.
requires authentication
This endpoint deletes a specific candidate status. The user must be authenticated and have appropriate permissions. The status cannot be deleted if it is assigned to one or more candidates.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/candidate_status/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate_status/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": "Candidate Status deleted successfully!"
}
Example response (400):
{
"error": false,
"message": "Cannot delete. This status is assigned to one or more candidates."
}
Example response (404):
{
"error": true,
"message": "Candidate status not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the candidate status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reorder candidate statuses.
requires authentication
This endpoint updates the order of candidate statuses based on the provided array of IDs and positions. The user must be authenticated to perform this action.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/candidate_status/reorder" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"order\": [
{
\"id\": 1,
\"position\": 1
},
{
\"id\": 2,
\"position\": 2
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/candidate_status/reorder"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"order": [
{
"id": 1,
"position": 1
},
{
"id": 2,
"position": 2
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Order updated successfully!",
"data": []
}
Example response (422):
{
"error": true,
"message": "The order field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while reordering the candidate statuses."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List candidate statuses or retrieve a single status.
requires authentication
This endpoint retrieves a paginated list of candidate statuses or a single status by ID, with optional search, sorting, and pagination parameters. The user must be authenticated to perform this action. The response includes permission details for editing and deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/candidate_status/list/1?search=Interview&sort=name&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/candidate_status/list/1"
);
const params = {
"search": "Interview",
"sort": "name",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Candidate statuses retreived successfully!",
"data": {
"total": 5,
"data": [
{
"id": 1,
"name": "Interviewing",
"color": "primary",
"order": 1,
"created_at": "2025-05-15 16:11:00",
"updated_at": "2025-05-15 16:11:00",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (404):
{
"error": true,
"message": "Candidate stutus not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Contract Management
Create a new contract.
requires authentication
This endpoint creates a new contract with the specified details. The user must be authenticated to perform this action. If the user is a client, the client_id will be automatically set to their ID.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/contracts/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Web Development Contract\",
\"value\": \"15,000.00\",
\"start_date\": \"2024-01-01\",
\"end_date\": \"2024-12-31\",
\"client_id\": 5,
\"project_id\": 12,
\"contract_type_id\": 3,
\"description\": \"Full-stack web development project\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/contracts/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Web Development Contract",
"value": "15,000.00",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"client_id": 5,
"project_id": 12,
"contract_type_id": 3,
"description": "Full-stack web development project",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Contract created successfully.",
"data": {
"id": 15,
"title": "Web Development Contract",
"value": "15000.00",
"formatted_value": "$15,000.00",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"client": {
"id": 5,
"name": "John Doe"
},
"project": {
"id": 12,
"title": "Company Website"
},
"contract_type": {
"id": 3,
"type": "Fixed Price"
},
"description": "Full-stack web development project",
"status": "not_signed",
"created_at": "2024-01-15T10:30:00Z"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"title": [
"The title field is required."
],
"value": [
"The value field is required."
],
"start_date": [
"The start date must be before end date."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing contract.
requires authentication
This endpoint updates an existing contract with new details. The user must be authenticated and have permission to edit contracts.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/contracts/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: multipart/form-data" \
--form "id=15"\
--form "title=Updated Web Development Contract"\
--form "value=18,000.00"\
--form "start_date=2024-01-01"\
--form "end_date=2024-12-31"\
--form "client_id=5"\
--form "project_id=12"\
--form "contract_type_id=3"\
--form "description=Updated full-stack web development project"\
--form "isApi=1"\
--form "signed_pdf=@C:\Users\infin_8kk6o2v\AppData\Local\Temp\phpC549.tmp" const url = new URL(
"http://127.0.0.1:8000/api/contracts/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', '15');
body.append('title', 'Updated Web Development Contract');
body.append('value', '18,000.00');
body.append('start_date', '2024-01-01');
body.append('end_date', '2024-12-31');
body.append('client_id', '5');
body.append('project_id', '12');
body.append('contract_type_id', '3');
body.append('description', 'Updated full-stack web development project');
body.append('isApi', '1');
body.append('signed_pdf', document.querySelector('input[name="signed_pdf"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Contract updated successfully.",
"data": {
"id": 15,
"title": "Updated Web Development Contract",
"value": "18000.00",
"formatted_value": "$18,000.00",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"client": {
"id": 5,
"name": "John Doe"
},
"project": {
"id": 12,
"title": "Company Website"
},
"contract_type": {
"id": 3,
"type": "Fixed Price"
},
"description": "Updated full-stack web development project",
"status": "partially_signed",
"signed_pdf_url": "storage/contracts/signed_contract_123.pdf",
"updated_at": "2024-01-20T14:45:00Z"
}
}
Example response (404):
{
"error": true,
"message": "Contract not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"signed_pdf": [
"The file must be a PDF.",
"The file size must be less than 10 MB."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List contracts with filtering and pagination.
requires authentication
This endpoint retrieves a paginated list of contracts with optional search, sorting, and filtering capabilities. The user must be authenticated to perform this action. Access is restricted based on user permissions.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/contracts/list?search=Web+Development&sort=start_date&order=ASC&limit=20&statuses[]=signed&statuses[]=partially_signed&type_ids[]=1&type_ids[]=3&type_ids[]=5&project_ids[]=12&project_ids[]=15&project_ids[]=18&client_ids[]=5&client_ids[]=8&date_between_from=2024-01-01&date_between_to=2024-12-31&start_date_from=2024-01-01&start_date_to=2024-06-30&end_date_from=2024-06-01&end_date_to=2024-12-31" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/list"
);
const params = {
"search": "Web Development",
"sort": "start_date",
"order": "ASC",
"limit": "20",
"statuses[0]": "signed",
"statuses[1]": "partially_signed",
"type_ids[0]": "1",
"type_ids[1]": "3",
"type_ids[2]": "5",
"project_ids[0]": "12",
"project_ids[1]": "15",
"project_ids[2]": "18",
"client_ids[0]": "5",
"client_ids[1]": "8",
"date_between_from": "2024-01-01",
"date_between_to": "2024-12-31",
"start_date_from": "2024-01-01",
"start_date_to": "2024-06-30",
"end_date_from": "2024-06-01",
"end_date_to": "2024-12-31",
};
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": "Contracts retrieved successfully!",
"total": 25,
"data": [
{
"id": 15,
"title": "Web Development Contract",
"value": "15000.00",
"formatted_value": "$15,000.00",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"duration": "Jan 01, 2024 To Dec 31, 2024",
"client": {
"id": 5,
"name": "John Doe",
"email": "john@example.com"
},
"project": {
"id": 12,
"title": "Company Website"
},
"contract_type": {
"id": 3,
"type": "Fixed Price"
},
"description": "Full-stack web development project",
"status": "signed",
"promisor_signed": true,
"promisee_signed": true,
"signed_pdf_url": "storage/contracts/signed_contract_123.pdf",
"created_by": {
"id": 1,
"name": "Admin User",
"type": "user"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
}
]
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"limit": [
"The limit must be between 1 and 100."
],
"start_date_from": [
"The start date from must be a valid date."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a single contract by ID.
requires authentication
This endpoint retrieves detailed information about a specific contract. The user must be authenticated and have access to the contract based on their permissions.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/contracts/get/15?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/get/15"
);
const params = {
"isApi": "1",
};
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": "Contract retrieved successfully.",
"data": {
"id": 15,
"title": "Web Development Contract",
"value": "15000.00",
"formatted_value": "$15,000.00",
"start_date": "2024-01-01",
"end_date": "2024-12-31",
"client": {
"id": 5,
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890"
},
"project": {
"id": 12,
"title": "Company Website",
"description": "Modern responsive website"
},
"contract_type": {
"id": 3,
"type": "Fixed Price"
},
"description": "Full-stack web development project",
"status": "signed",
"promisor_signed": true,
"promisee_signed": true,
"promisor_sign_date": "2024-01-18T09:15:00Z",
"promisee_sign_date": "2024-01-19T14:22:00Z",
"signed_pdf_url": "storage/contracts/signed_contract_123.pdf",
"created_by": {
"id": 1,
"name": "Admin User",
"type": "user"
},
"workspace_id": 1,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
}
}
Example response (403):
{
"error": true,
"message": "Access denied.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Contract not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Sign a contract with a base64 image.
requires authentication
This endpoint allows an authenticated user to sign a contract by uploading a base64-encoded signature image. The user must have appropriate permissions based on their role (admin or client). The image is saved, and the corresponding signature field in the contract is updated.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/contracts/create-sign?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 12,
\"signatureImage\": \"data:image\\/png;base64,iVBORw0KGgoAAAANSUhEUgAA...\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/contracts/create-sign"
);
const params = {
"isApi": "1",
};
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 = {
"id": 12,
"signatureImage": "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"id": 12,
"activity_message": "John Doe signed contract NDA Agreement"
}
Example response (422):
{
"error": true,
"message": "The id field is required. (and 1 more error)"
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a contract and associated files.
requires authentication
This endpoint deletes a contract by its ID, including associated signature images and the signed PDF file (if any). Only authorized users can perform this operation.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/contracts/destroy/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/destroy/15"
);
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": "Contract deleted successfully!",
"data": []
}
Example response (404):
{
"error": true,
"message": "Contract not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove signature from a contract.
requires authentication
This endpoint allows authorized users to remove their signature from a contract, effectively "unsigned" the contract.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/contracts/delete-sign/15?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/delete-sign/15"
);
const params = {
"isApi": "1",
};
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": "John Doe unsigned contract Web Development Contract",
"id": 15
}
Example response (403):
{
"error": true,
"message": "Unauthorized access.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Contract not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Contract Type Management
Create a new contract type.
requires authentication
This endpoint creates a new contract type that can be used when creating contracts. The user must be authenticated and have permission to create contract types.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/contracts/store-contract-type" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"type\": \"Hourly Rate\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/contracts/store-contract-type"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"type": "Hourly Rate",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Contract type created successfully.",
"data": {
"id": 5,
"type": "Hourly Rate",
"workspace_id": 1,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"type": [
"The type field is required.",
"The type has already been taken."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing contract type.
requires authentication
This endpoint updates an existing contract type with new details. The user must be authenticated and have permission to edit contract types.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/contracts/update-contract-type" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 3,
\"type\": \"Updated Monthly Retainer\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/contracts/update-contract-type"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 3,
"type": "Updated Monthly Retainer",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Contract type updated successfully.",
"data": {
"id": 3,
"type": "Updated Monthly Retainer",
"workspace_id": 1,
"created_at": "2024-01-03T10:30:00Z",
"updated_at": "2024-01-20T15:45:00Z"
}
}
Example response (404):
{
"error": true,
"message": "Contract type not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"type": [
"The type field is required.",
"The type has already been taken."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List contract types with filtering and pagination.
requires authentication
This endpoint retrieves a paginated list of contract types with optional search and sorting capabilities. The user must be authenticated to perform this action.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/contracts/contract-types-list?search=Fixed&sort=type&order=ASC&limit=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/contract-types-list"
);
const params = {
"search": "Fixed",
"sort": "type",
"order": "ASC",
"limit": "20",
};
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": "Contract types retrieved successfully.",
"total": 8,
"data": [
{
"id": 1,
"type": "Fixed Price",
"workspace_id": 1,
"created_at": "2024-01-01T08:00:00Z",
"updated_at": "2024-01-01T08:00:00Z"
},
{
"id": 2,
"type": "Time & Materials",
"workspace_id": 1,
"created_at": "2024-01-02T09:15:00Z",
"updated_at": "2024-01-02T09:15:00Z"
},
{
"id": 3,
"type": "Monthly Retainer",
"workspace_id": 1,
"created_at": "2024-01-03T10:30:00Z",
"updated_at": "2024-01-03T10:30:00Z"
}
]
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"limit": [
"The limit must be between 1 and 100."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a single contract type by ID.
requires authentication
This endpoint retrieves detailed information about a specific contract type. The user must be authenticated and have access to the contract type.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/contracts/get-contract-type/3?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/get-contract-type/3"
);
const params = {
"isApi": "1",
};
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": "Contract type retrieved successfully.",
"data": {
"id": 3,
"type": "Monthly Retainer",
"workspace_id": 1,
"created_at": "2024-01-03T10:30:00Z",
"updated_at": "2024-01-03T10:30:00Z"
}
}
Example response (404):
{
"error": true,
"message": "Contract type not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a contract type.
requires authentication
This endpoint deletes a contract type. Any contracts using this type will be updated to use the default contract type (ID: 0). The user must be authenticated and have permission to delete contract types.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/contracts/delete-contract-type/5?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/contracts/delete-contract-type/5"
);
const params = {
"isApi": "1",
};
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": "Contract type deleted successfully.",
"data": {
"id": 5,
"type": "Hourly Rate",
"workspace_id": 1
}
}
Example response (403):
{
"error": true,
"message": "Default contract type cannot be deleted.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Contract type not found.",
"data": []
}
Example response (409):
{
"error": true,
"message": "Cannot delete contract type as it is being used by existing contracts.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Custom Field Management
Create a new custom field.
requires authentication
This endpoint allows the creation of a new custom field for either the project or task module. Depending on the field type, options may be required (for example: radio, checkbox, select). User must be authenticated.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/custom-fields" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"module\": \"task\",
\"field_label\": \"Priority\",
\"field_type\": \"select\",
\"options\": \"High\\\\nMedium\\\\nLow\",
\"required\": \"1\",
\"visibility\": \"1\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/custom-fields"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"module": "task",
"field_label": "Priority",
"field_type": "select",
"options": "High\\nMedium\\nLow",
"required": "1",
"visibility": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Custom Field Created Successfully",
"data": {
"id": 12,
"type": "custom_field"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"field_label": [
"The field label field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "Custom Field Couldn't Created.",
"data": {
"error": "Exception message",
"line": 85,
"file": "/var/www/html/app/Http/Controllers/CustomFieldController.php"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List custom fields or retrieve a single custom field.
requires authentication
This endpoint retrieves a paginated list of custom fields or a single custom field by ID. Supports optional search, sorting, pagination, and filtering by module, label, or field type. User must be authenticated to access this endpoint.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/custom-fields/list?search=priority&sort=field_label&order=ASC&limit=20&offset=5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/custom-fields/list"
);
const params = {
"search": "priority",
"sort": "field_label",
"order": "ASC",
"limit": "20",
"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": "CustomFields retrieved successfully!",
"data": {
"total": 2,
"data": [
{
"id": 3,
"module": "task",
"field_type": "select",
"field_label": "Priority",
"options": [
"High",
"Medium",
"Low"
],
"required": "1",
"visibility": "1"
}
]
}
}
Example response (404):
{
"error": true,
"message": "CustomField not found",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing custom field.
requires authentication
This endpoint updates the details of a custom field identified by its ID.
Options are required if the field type is radio, checkbox, or select.
User must be authenticated.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/custom-fields/update/12" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"module\": \"project\",
\"field_label\": \"Status\",
\"field_type\": \"radio\",
\"options\": \"Active\\\\nInactive\",
\"required\": \"1\",
\"visibility\": \"0\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/custom-fields/update/12"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"module": "project",
"field_label": "Status",
"field_type": "radio",
"options": "Active\\nInactive",
"required": "1",
"visibility": "0"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Custom field updated successfully",
"data": {
"id": 12,
"type": "custom_field"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"data": {
"field_label": [
"The field label field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": {
"error": "Exception message",
"line": 78,
"file": "/var/www/html/app/Http/Controllers/CustomFieldController.php"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a custom field.
requires authentication
This endpoint deletes a specific custom field by ID. User must be authenticated.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/custom-fields/destroy/15" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/custom-fields/destroy/15"
);
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": "CustomField deleted successfully",
"data": []
}
Example response (404):
{
"error": true,
"message": "CustomField not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Deduction Management
Create a new deduction.
Creates a deduction in the current workspace. Deductions can be of type amount or percentage.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/deductions/store" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Income Tax\",
\"type\": \"percentage\",
\"amount\": \"150.00\",
\"percentage\": \"5\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/deductions/store"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Income Tax",
"type": "percentage",
"amount": "150.00",
"percentage": "5",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Deduction created successfully.",
"data": {
"id": 9,
"title": "Income Tax",
"type": "Percentage",
"percentage": 5,
"amount": "0.00",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"title": [
"The title field is required."
],
"type": [
"The type field is required."
]
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a deduction by ID.
Retrieves a specific deduction using its ID.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/deductions/get/1?isApi=1" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/deductions/get/1"
);
const params = {
"isApi": "1",
};
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": "Deduction retrieved successfully.",
"data": {
"id": 1,
"title": "Income Tax",
"type": "Percentage",
"percentage": 5,
"amount": "0.00",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (404):
{
"error": true,
"message": "No query results for model [App\\Models\\Deduction] 9999",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get list of deductions.
Returns a list of deductions for the current workspace in API format, with optional filtering and sorting.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/deductions/list?search=Tax&sort=title&order=ASC&limit=25&types%5B%5D[]=percentage" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/deductions/list"
);
const params = {
"search": "Tax",
"sort": "title",
"order": "ASC",
"limit": "25",
"types[][0]": "percentage",
};
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": "Deductions retrieved successfully.",
"total": 1,
"data": [
{
"id": 1
"title": "Income Tax",
"type": "Percentage",
"percentage": 5,
"amount": "0.00",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing deduction.
Updates the specified deduction in the current workspace.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/deductions/update" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 1,
\"title\": \"Updated Income Tax\",
\"type\": \"amount\",
\"amount\": \"100.00\",
\"percentage\": \"10\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/deductions/update"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 1,
"title": "Updated Income Tax",
"type": "amount",
"amount": "100.00",
"percentage": "10",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Deduction updated successfully.",
"data": {
"id": 1,
"title": "Updated Income Tax",
"type": "Amount",
"percentage": null,
"amount": "100.00",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (404):
{
"error": true,
"message": "No query results for model [App\\Models\\Deduction] 9999",
"data": []
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"title": [
"The title has already been taken."
]
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a deduction.
Deletes the deduction with the given ID and detaches associated payslips.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/deductions/destroy/2" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/deductions/destroy/2"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Deduction deleted successfully.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Deduction not found.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Email Management
Generate a preview of an email.
requires authentication
This endpoint generates a preview of an email by replacing placeholders in the provided subject and body, and listing any attachments. The user must be authenticated to perform this action. The content can be base64-encoded if specified.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/emails/preview?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"subject\": \"Welcome Email\",
\"body\": \"<p>Hello USER_NAME!<\\/p>\",
\"placeholders\": null,
\"attachments\": null,
\"is_encoded\": \"1\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/emails/preview"
);
const params = {
"isApi": "1",
};
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 = {
"subject": "Welcome Email",
"body": "<p>Hello USER_NAME!<\/p>",
"placeholders": null,
"attachments": null,
"is_encoded": "1"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "preview generated successfully!",
"data": "<div><p>Hello John Doe!</p></div><hr><div><strong>Attachments:</strong><ul><li>attachment.pdf</li></ul></div>"
}
Example response (500):
{
"error": true,
"message": "Failed to generate preview"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Send or schedule emails.
requires authentication
This endpoint sends or schedules emails to one or more recipients, using either a template or custom content. The user must be authenticated to perform this action. Attachments are supported, and scheduling is optional. Certain file extensions (e.g., zip, exe) are blocked for security.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/emails/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"emails\": [
\"john.doe@example.com\"
],
\"email_template_id\": 1,
\"placeholders\": null,
\"subject\": \"Welcome Email\",
\"body\": \"<p>Hello!<\\/p>\",
\"attachments\": null,
\"scheduled_at\": \"2025-05-16 10:00:00\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/emails/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"emails": [
"john.doe@example.com"
],
"email_template_id": 1,
"placeholders": null,
"subject": "Welcome Email",
"body": "<p>Hello!<\/p>",
"attachments": null,
"scheduled_at": "2025-05-16 10:00:00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Emails sent successfully."
}
Example response (200):
{
"error": false,
"message": "Emails scheduled successfully!"
}
Example response (422):
{
"error": true,
"message": "The emails field is required."
}
Example response (422):
{
"error": true,
"message": "Attachments with .zip, .exe and similar file types are not allowed for security reasons."
}
Example response (500):
{
"error": true,
"message": "An unexpected error occurred while sending/scheduling the emails."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List scheduled emails or retrieve a single email.
requires authentication
This endpoint retrieves a paginated list of scheduled emails or a single email by ID, with optional search, sorting, and pagination parameters. The user must be authenticated, and access is restricted based on permissions (admin/all-data-access or user-owned emails). The response includes permission details for editing and deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/emails/historyList/1?search=john.doe&sort=subject&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/emails/historyList/1"
);
const params = {
"search": "john.doe",
"sort": "subject",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Emails retrieved successfully.",
"data": {
"total": 5,
"data": [
{
"id": 1,
"to_email": "john.doe@example.com",
"subject": "Welcome Email",
"body": "<p>Hello John!</p>",
"status": "sent",
"scheduled_at": "2025-05-15 16:30:00",
"created_at": "2025-05-15 16:30:00",
"updated_at": "2025-05-15 16:30:00",
"user_id": 7,
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (404):
{
"error": true,
"message": "Email not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a scheduled email.
requires authentication
This endpoint deletes a specific scheduled email record. The user must be authenticated and have appropriate permissions to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/emails/history/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/emails/history/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": "Scheduled Email deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Scheduled Email not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the scheduled email."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve email template data.
requires authentication
This endpoint fetches the details of a specific email template, including its subject, body, and placeholders (excluding default ones like CURRENT_YEAR, COMPANY_TITLE). The user must be authenticated to perform this action.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/emails/template-data/1?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/emails/template-data/1"
);
const params = {
"isApi": "1",
};
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": "Template data retrieved successfully!",
"data": {
"id": 1,
"subject": "Welcome Email",
"body": "<p>Hello USER_NAME, welcome to COMPANY_TITLE!</p>",
"placeholders": [
"USER_NAME"
],
"created_at": "2025-05-15 16:30:00",
"updated_at": "2025-05-15 16:30:00"
}
}
Example response (404):
{
"error": true,
"message": "Template not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the template data."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Email Template Management
Create a new email template.
requires authentication
This endpoint creates a new email template with a specified name, subject, and body. The user must be authenticated to perform this action. The body can be base64-encoded if specified. Placeholders are automatically extracted from the body, excluding system constants like COMPANY_LOGO.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/email-templates/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Welcome Template\",
\"subject\": \"Welcome to Our Company\",
\"body\": \"<p>Hello USER_NAME!<\\/p>\",
\"is_encoded\": \"1\",
\"content\": \"PGh0bWw+PHA+SGVsbG8ge1VTRVJfTkFNRX0hPC9wPjwvaHRtbD4=\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/email-templates/store"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Welcome Template",
"subject": "Welcome to Our Company",
"body": "<p>Hello USER_NAME!<\/p>",
"is_encoded": "1",
"content": "PGh0bWw+PHA+SGVsbG8ge1VTRVJfTkFNRX0hPC9wPjwvaHRtbD4="
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"error": false,
"message": "Email Template Created Successfully!",
"data": {
"id": 1,
"name": "Welcome Template",
"subject": "Welcome to Our Company",
"body": "<p>Hello USER_NAME!</p>",
"placeholders": [
"USER_NAME"
],
"workspace_id": 1,
"created_at": "2025-05-15 17:00:00",
"updated_at": "2025-05-15 17:00:00"
}
}
Example response (422):
{
"error": true,
"message": "The name field is required."
}
Example response (500):
{
"error": "Detailed error message",
"message": "Failed to create email template",
"code": 0,
"file": "path/to/file.php",
"line": 123,
"trace": "Stack trace"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing email template.
requires authentication
This endpoint updates the name, subject, and body of an existing email template. The user must be authenticated to perform this action. The body can be base64-encoded if specified. Placeholders are automatically extracted from the body, excluding system constants like COMPANY_LOGO.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/email-templates/update/1?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Welcome Template\",
\"subject\": \"Welcome to Our Company\",
\"body\": \"<p>Hello USER_NAME!<\\/p>\",
\"is_encoded\": \"1\",
\"content\": \"PGh0bWw+PHA+SGVsbG8ge1VTRVJfTkFNRX0hPC9wPjwvaHRtbD4=\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/email-templates/update/1"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Welcome Template",
"subject": "Welcome to Our Company",
"body": "<p>Hello USER_NAME!<\/p>",
"is_encoded": "1",
"content": "PGh0bWw+PHA+SGVsbG8ge1VTRVJfTkFNRX0hPC9wPjwvaHRtbD4="
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Email Template Updated Successfully!",
"data": {
"id": 1,
"name": "Welcome Template",
"subject": "Welcome to Our Company",
"body": "<p>Hello USER_NAME!</p>",
"placeholders": [
"USER_NAME"
],
"workspace_id": 1,
"created_at": "2025-05-15 17:00:00",
"updated_at": "2025-05-15 17:05:00"
}
}
Example response (404):
{
"error": true,
"message": "Email template not found"
}
Example response (422):
{
"error": true,
"message": "The name field is required."
}
Example response (500):
{
"error": true,
"message": "Something went wrong."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an email template.
requires authentication
This endpoint deletes a specific email template. The user must be authenticated and have appropriate permissions to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/email-templates/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/email-templates/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": "Email Template deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Email template not found"
}
Example response (500):
{
"error": true,
"message": "Something went wrong."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List email templates or retrieve a single template.
requires authentication
This endpoint retrieves a paginated list of email templates or a single template by ID, with optional search, sorting, and pagination parameters. The user must be authenticated to perform this action. The response includes permission details for editing and deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/email-templates/list/1?search=Welcome&sort=name&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/email-templates/list/1"
);
const params = {
"search": "Welcome",
"sort": "name",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Email templates retrieved successfully.",
"data": {
"total": 5,
"data": [
{
"id": 1,
"name": "Welcome Template",
"subject": "Welcome to Our Company",
"body": "<p>Hello USER_NAME!</p>",
"placeholders": [
"USER_NAME"
],
"workspace_id": 1,
"created_at": "2025-05-15 17:00:00",
"updated_at": "2025-05-15 17:00:00",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (404):
{
"error": true,
"message": "Email template not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Interview Management
Create a new interview.
requires authentication
This endpoint creates a new interview record for a candidate, with details such as the interviewer, round, schedule, mode, and status. The user must be authenticated to perform this action. A notification is triggered to inform the candidate and interviewer.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/interviews/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"candidate_id\": 101,
\"interviewer_id\": 7,
\"round\": \"Technical\",
\"scheduled_at\": \"2025-05-20 10:00:00\",
\"mode\": \"Online\",
\"location\": \"Zoom\",
\"status\": \"scheduled\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/interviews/store"
);
const params = {
"isApi": "1",
};
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 = {
"candidate_id": 101,
"interviewer_id": 7,
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"mode": "Online",
"location": "Zoom",
"status": "scheduled"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"error": false,
"message": "Interview Created Successfully!",
"data": {
"id": 1,
"candidate_id": 101,
"interviewer_id": 7,
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"mode": "Online",
"location": "Zoom",
"status": "scheduled",
"created_at": "2025-05-15 16:15:00",
"updated_at": "2025-05-15 16:15:00"
}
}
Example response (422):
{
"error": true,
"message": "The candidate_id field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the interview."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an interview.
requires authentication
This endpoint updates the details of an existing interview, such as the candidate, interviewer, round, schedule, mode, location, or status. The user must be authenticated to perform this action. A notification is triggered if the status changes.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/interviews/update/1?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"candidate_id\": 101,
\"interviewer_id\": 7,
\"round\": \"Technical\",
\"scheduled_at\": \"2025-05-20 10:00:00\",
\"mode\": \"Online\",
\"location\": \"Zoom\",
\"status\": \"completed\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/interviews/update/1"
);
const params = {
"isApi": "1",
};
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 = {
"candidate_id": 101,
"interviewer_id": 7,
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"mode": "Online",
"location": "Zoom",
"status": "completed"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Interview Updated Successfully!",
"data": {
"id": 1,
"candidate_id": 101,
"interviewer_id": 7,
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"mode": "Online",
"location": "Zoom",
"status": "completed",
"created_at": "2025-05-15 16:15:00",
"updated_at": "2025-05-15 16:20:00"
}
}
Example response (404):
{
"error": true,
"message": "Interview not found"
}
Example response (422):
{
"error": true,
"message": "The candidate_id field is required."
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the interview."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an interview.
requires authentication
This endpoint deletes a specific interview record. The user must be authenticated and have appropriate permissions to perform this action.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/interviews/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/interviews/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": "Interview deleted successfully!"
}
Example response (404):
{
"error": false,
"message": "Interview not found",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the interview."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List interviews or retrieve a single interview.
requires authentication
This endpoint retrieves a paginated list of interviews or a single interview by ID, with optional search, sorting, and status filtering. The user must be authenticated to perform this action. The response includes permission details for editing and deletion.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/interviews/list/1?search=Technical&sort=newest&limit=20&offset=10&status=scheduled" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/interviews/list/1"
);
const params = {
"search": "Technical",
"sort": "newest",
"limit": "20",
"offset": "10",
"status": "scheduled",
};
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": "Interviews retrieved successfully",
"data": {
"total": 10,
"data": [
{
"id": 1,
"candidate_id": 101,
"candidate_name": "John Doe",
"interviewer_id": 7,
"interviewer_name": "Jane Smith",
"round": "Technical",
"scheduled_at": "2025-05-20 10:00:00",
"mode": "Online",
"location": "Zoom",
"status": "scheduled",
"created_at": "2025-05-15 16:15:00",
"updated_at": "2025-05-15 16:15:00",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (404):
{
"error": true,
"message": "Interview not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "Validation failed: The search field must be a string.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Lead Form Management
Create a new lead form.
requires authentication
This endpoint creates a new lead form with dynamic, mappable fields for capturing leads, mapping them to lead sources, stages, and assigned users within the current workspace. The user must be authenticated and authorized to manage lead forms.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-forms/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Website Leads\",
\"description\": \"Capture leads from website visitors\",
\"source_id\": 2,
\"stage_id\": 2,
\"assigned_to\": 11,
\"redirect_url\": \"https:\\/\\/altenwerth.org\\/nam-occaecati-voluptates-culpa-nisi-molestias.html\",
\"fields\": [
\"corrupti\"
],
\"fields[0][label]\": \"First Name\",
\"fields[0][type]\": \"text\",
\"fields[0][is_required]\": true,
\"fields[0][is_mapped]\": true,
\"fields[0][name]\": \"first_name\",
\"fields[0][placeholder]\": \"Enter your first name\",
\"fields[1][label]\": \"Last Name\",
\"fields[1][type]\": \"text\",
\"fields[1][is_required]\": true,
\"fields[1][is_mapped]\": true,
\"fields[1][name]\": \"last_name\",
\"fields[1][placeholder]\": \"Enter your last name\",
\"fields[2][label]\": \"Email\",
\"fields[2][type]\": \"text\",
\"fields[2][is_required]\": true,
\"fields[2][is_mapped]\": true,
\"fields[2][name]\": \"email\",
\"fields[2][placeholder]\": \"Enter your email\",
\"fields[3][label]\": \"Phone\",
\"fields[3][type]\": \"number\",
\"fields[3][is_required]\": true,
\"fields[3][is_mapped]\": true,
\"fields[3][name]\": \"phone\",
\"fields[3][placeholder]\": \"Enter your phone number\",
\"fields[4][label]\": \"Company\",
\"fields[4][type]\": \"text\",
\"fields[4][is_required]\": true,
\"fields[4][is_mapped]\": true,
\"fields[4][name]\": \"company\",
\"fields[4][placeholder]\": \"Enter your company name\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Website Leads",
"description": "Capture leads from website visitors",
"source_id": 2,
"stage_id": 2,
"assigned_to": 11,
"redirect_url": "https:\/\/altenwerth.org\/nam-occaecati-voluptates-culpa-nisi-molestias.html",
"fields": [
"corrupti"
],
"fields[0][label]": "First Name",
"fields[0][type]": "text",
"fields[0][is_required]": true,
"fields[0][is_mapped]": true,
"fields[0][name]": "first_name",
"fields[0][placeholder]": "Enter your first name",
"fields[1][label]": "Last Name",
"fields[1][type]": "text",
"fields[1][is_required]": true,
"fields[1][is_mapped]": true,
"fields[1][name]": "last_name",
"fields[1][placeholder]": "Enter your last name",
"fields[2][label]": "Email",
"fields[2][type]": "text",
"fields[2][is_required]": true,
"fields[2][is_mapped]": true,
"fields[2][name]": "email",
"fields[2][placeholder]": "Enter your email",
"fields[3][label]": "Phone",
"fields[3][type]": "number",
"fields[3][is_required]": true,
"fields[3][is_mapped]": true,
"fields[3][name]": "phone",
"fields[3][placeholder]": "Enter your phone number",
"fields[4][label]": "Company",
"fields[4][type]": "text",
"fields[4][is_required]": true,
"fields[4][is_mapped]": true,
"fields[4][name]": "company",
"fields[4][placeholder]": "Enter your company name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead form created successfully!",
"form": {
"id": 12,
"title": "Website Leads",
"description": "Capture leads from website visitors",
"created_by": 1,
"workspace_id": 1,
"source_id": 2,
"stage_id": 2,
"assigned_to": 11,
"lead_form_fields": [
{
"id": 45,
"label": "First Name",
"name": "first_name",
"type": "text",
"is_required": true,
"is_mapped": true,
"options": null,
"order": 1
},
{
"id": 46,
"label": "Last Name",
"name": "last_name",
"type": "text",
"is_required": true,
"is_mapped": true,
"options": null,
"order": 2
},
{
"id": 47,
"label": "Email",
"name": "email",
"type": "text",
"is_required": true,
"is_mapped": true,
"options": null,
"order": 3
},
{
"id": 48,
"label": "Phone",
"name": "phone",
"type": "number",
"is_required": true,
"is_mapped": true,
"options": null,
"order": 4
},
{
"id": 49,
"label": "Company",
"name": "company",
"type": "text",
"is_required": true,
"is_mapped": true,
"options": null,
"order": 5
},
{
"id": 50,
"label": "Interested Service",
"name": null,
"type": "select",
"is_required": true,
"is_mapped": false,
"options": [
"Web Development",
"SEO",
"UI/UX Design"
],
"order": 6
}
]
},
"public_url": "https://yourapp.com/forms/website-leads",
"embed_code": "<iframe src='https://yourapp.com/forms/embed/website-leads'></iframe>"
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"title": [
"Form title is required."
],
"fields.0.label": [
"Field label is required."
],
"fields.0.type": [
"Field type is required."
]
}
}
Example response (500):
{
"error": true,
"message": "Failed to create form: An unexpected error occurred."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing lead form.
requires authentication
This endpoint updates an existing lead form, including its title, description, source, stage, assigned user, and associated fields. The user must be authenticated and authorized to manage lead forms.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-forms/update/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"title\": \"Website Leads\",
\"description\": \"Capture leads from website visitors\",
\"source_id\": 2,
\"stage_id\": 2,
\"assigned_to\": 11,
\"fields\": [
\"ut\"
],
\"fields[0][label]\": \"First Name\",
\"fields[0][type]\": \"text\",
\"fields[0][is_required]\": true,
\"fields[0][is_mapped]\": true,
\"fields[0][name]\": \"first_name\",
\"fields[0][placeholder]\": \"Enter your first name\",
\"fields[1][label]\": \"Last Name\",
\"fields[1][type]\": \"text\",
\"fields[1][is_required]\": true,
\"fields[1][is_mapped]\": true,
\"fields[1][name]\": \"last_name\",
\"fields[1][placeholder]\": \"Enter your last name\",
\"fields[2][label]\": \"Email\",
\"fields[2][type]\": \"text\",
\"fields[2][is_required]\": true,
\"fields[2][is_mapped]\": true,
\"fields[2][name]\": \"email\",
\"fields[2][placeholder]\": \"Enter your email\",
\"fields[3][label]\": \"Phone\",
\"fields[3][type]\": \"number\",
\"fields[3][is_required]\": true,
\"fields[3][is_mapped]\": true,
\"fields[3][name]\": \"phone\",
\"fields[3][placeholder]\": \"Enter your phone number\",
\"fields[4][label]\": \"Company\",
\"fields[4][type]\": \"text\",
\"fields[4][is_required]\": true,
\"fields[4][is_mapped]\": true,
\"fields[4][name]\": \"company\",
\"fields[4][placeholder]\": \"Enter your company name\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/update/5"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"title": "Website Leads",
"description": "Capture leads from website visitors",
"source_id": 2,
"stage_id": 2,
"assigned_to": 11,
"fields": [
"ut"
],
"fields[0][label]": "First Name",
"fields[0][type]": "text",
"fields[0][is_required]": true,
"fields[0][is_mapped]": true,
"fields[0][name]": "first_name",
"fields[0][placeholder]": "Enter your first name",
"fields[1][label]": "Last Name",
"fields[1][type]": "text",
"fields[1][is_required]": true,
"fields[1][is_mapped]": true,
"fields[1][name]": "last_name",
"fields[1][placeholder]": "Enter your last name",
"fields[2][label]": "Email",
"fields[2][type]": "text",
"fields[2][is_required]": true,
"fields[2][is_mapped]": true,
"fields[2][name]": "email",
"fields[2][placeholder]": "Enter your email",
"fields[3][label]": "Phone",
"fields[3][type]": "number",
"fields[3][is_required]": true,
"fields[3][is_mapped]": true,
"fields[3][name]": "phone",
"fields[3][placeholder]": "Enter your phone number",
"fields[4][label]": "Company",
"fields[4][type]": "text",
"fields[4][is_required]": true,
"fields[4][is_mapped]": true,
"fields[4][name]": "company",
"fields[4][placeholder]": "Enter your company name"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead form updated successfully",
"data": {
"id": 5,
"form": {
"id": 5,
"title": "Website Leads",
"description": "Capture leads from website visitors",
"source": "Website",
"stage": "New",
"assigned_to": {
"id": 11,
"first_name": "Dimpal",
"last_name": "Shah",
"email": "dimpal@example.com"
},
"is_active": true,
"fields": [
{
"label": "First Name",
"type": "text",
"is_required": true,
"is_mapped": true,
"name": "first_name",
"options": null,
"placeholder": "Enter your first name"
},
{
"label": "Interested Service",
"type": "select",
"is_required": true,
"is_mapped": false,
"options": [
"Web Development",
"SEO",
"UI/UX Design"
],
"placeholder": null
}
],
"created_at": "2025-07-21T12:00:00.000000Z",
"updated_at": "2025-07-21T13:00:00.000000Z"
}
}
}
Example response (422):
{
"error": true,
"message": "Validation failed",
"errors": {
"title": [
"The title field is required."
],
"fields.0.label": [
"The field label is required."
],
"fields.0.type": [
"The field type is required."
]
}
}
Example response (500):
{
"error": true,
"message": "Failed to update form",
"data": {
"error": "SQLSTATE[HY000]: General error: ...",
"line": 120
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a Lead Form.
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://127.0.0.1:8000/api/lead-forms/destroy/14" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/destroy/14"
);
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": "Lead Form deleted successfully.",
"id": 101,
}
Example response (404):
{
"error": true,
"message": "Lead Form not found."
}
Example response (500):
{
"error": true,
"message": "Lead Form couldn't be deleted."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List lead forms with optional filters, sorting, and pagination.
requires authentication
This endpoint retrieves a paginated list of lead forms or a specific lead form by ID, with optional search, sorting, and pagination parameters. The response includes permission details for editing and deletion. The user must be authenticated and authorized to manage lead forms.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-forms/api-list?id=1&search=Website&sort=created_at&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/api-list"
);
const params = {
"id": "1",
"search": "Website",
"sort": "created_at",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Lead forms retrieved successfully.",
"total": 5,
"data": [
{
"id": 1,
"title": "Website Lead Form",
"description": "Lead form for website captures.",
"source": { "id": 2, "name": "Website" },
"stage": { "id": 3, "name": "New", "color": "primary" },
"assigned_to": { "id": 5, "first_name": "John", "last_name": "Doe", "email": "john@example.com", "photo": "..." },
"fields": [...],
"public_url": "https://...",
"embed_code": "<iframe ...>",
"leads_count": 15,
"created_at": "2025-07-21 10:15:00",
"updated_at": "2025-07-21 10:15:00",
"sent_time": "2 hours ago"
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
Example response (404):
{
"error": false,
"message": "Lead form(s) not found.",
"total": 0,
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead forms."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Toggle lead form active/inactive status.
requires authentication
This endpoint toggles the is_active status of a lead form between active (1) and inactive (0).
The user must be authenticated and authorized to manage lead forms.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-forms/6/toggle" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/6/toggle"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"success": true,
"message": "Form status updated successfully!",
"status": true
}
Example response (404):
{
"error": false,
"message": "Lead form not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the lead form status."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List lead form responses with optional filters, sorting, and pagination.
requires authentication
This endpoint retrieves a paginated list of responses (leads) for a specific lead form, with optional search, sorting, and pagination parameters. The user must be authenticated and authorized to view lead form responses.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-forms/responses/api-list/1?search=John&sort=created_at&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-forms/responses/api-list/1"
);
const params = {
"search": "John",
"sort": "created_at",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Lead form responses retrieved successfully.",
"total": 2,
"data": [
{
"id": 5,
"name": "John Doe",
"email": "john@example.com",
"phone": "9876543210",
"company": "Example Corp",
"submitted_at": "2025-07-21",
"sent_time": "2 hours ago"
}
]
}
Example response (404):
{
"error": false,
"message": "Lead form responses not found.",
"total": 0,
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead form responses."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leads Management
Create a new lead.
requires authentication
This endpoint creates a new lead in the system. The user must be authenticated and belong to the workspace. All required fields must be provided, and the email must be unique.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"1234567890\",
\"country_code\": \"+1\",
\"country_iso_code\": \"US\",
\"source_id\": 3,
\"stage_id\": 2,
\"assigned_to\": 7,
\"job_title\": \"Marketing Manager\",
\"industry\": \"Technology\",
\"company\": \"Acme Corp\",
\"website\": \"https:\\/\\/acme.com\",
\"linkedin\": \"https:\\/\\/linkedin.com\\/in\\/johndoe\",
\"instagram\": \"https:\\/\\/instagram.com\\/johndoe\",
\"facebook\": \"https:\\/\\/facebook.com\\/johndoe\",
\"pinterest\": \"https:\\/\\/pinterest.com\\/johndoe\",
\"city\": \"New York\",
\"state\": \"NY\",
\"zip\": \"10001\",
\"country\": \"United States\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/leads/store"
);
const params = {
"isApi": "1",
};
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 = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"country_code": "+1",
"country_iso_code": "US",
"source_id": 3,
"stage_id": 2,
"assigned_to": 7,
"job_title": "Marketing Manager",
"industry": "Technology",
"company": "Acme Corp",
"website": "https:\/\/acme.com",
"linkedin": "https:\/\/linkedin.com\/in\/johndoe",
"instagram": "https:\/\/instagram.com\/johndoe",
"facebook": "https:\/\/facebook.com\/johndoe",
"pinterest": "https:\/\/pinterest.com\/johndoe",
"city": "New York",
"state": "NY",
"zip": "10001",
"country": "United States"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead created successfully!",
"data": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"company": "Acme Corp",
"stage_id": 2,
"source_id": 3,
"assigned_to": 7,
"created_at": "2025-05-15T10:00:00.000000Z",
"updated_at": "2025-05-15T10:00:00.000000Z"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"email": [
"The email field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the lead."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific lead.
requires authentication
This endpoint retrieves the details of a specific lead by its ID. The user must be authenticated and authorized to access the lead.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/leads/get/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/get/5"
);
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": "Lead retrieved successfully!",
"data": {
"id": 5,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"company": "Acme Corp",
"stage_id": 2,
"source_id": 3,
"assigned_to": 7,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List leads with optional filters, sorting, and pagination.
requires authentication
This endpoint retrieves a paginated list of leads accessible to the authenticated user, with optional search, source and stage filters, date range filtering, and sorting. Permissions for editing and deleting are included in the response.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/leads/list?search=John&source_ids[]=1&source_ids[]=2&stage_ids[]=3&stage_ids[]=4&start_date=2025-01-01&end_date=2025-05-01&sort=newest&limit=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/list"
);
const params = {
"search": "John",
"source_ids[0]": "1",
"source_ids[1]": "2",
"stage_ids[0]": "3",
"stage_ids[1]": "4",
"start_date": "2025-01-01",
"end_date": "2025-05-01",
"sort": "newest",
"limit": "20",
};
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": "Leads retrieved successfully!",
"data": {
"total": 50,
"data": [
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"company": "Acme Corp",
"job_title": "Manager",
"source": {
"id": 1,
"name": "Website"
},
"stage": {
"id": 2,
"name": "Negotiation",
"color": "primary"
},
"assigned_user": {
"id": 5,
"name": "Jane Smith"
},
"created_at": "2025-01-10T12:00:00.000000Z",
"updated_at": "2025-05-15T10:00:00.000000Z",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the leads."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a specific lead.
requires authentication
This endpoint updates the details of an existing lead. The user must be authenticated and belong to the workspace. The email must remain unique among other leads.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/update/5?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"email\": \"john.doe@example.com\",
\"phone\": \"1234567890\",
\"country_code\": \"+1\",
\"country_iso_code\": \"US\",
\"source_id\": 3,
\"stage_id\": 2,
\"assigned_to\": 7,
\"job_title\": \"CTO\",
\"industry\": \"SaaS\",
\"company\": \"Acme Corp\",
\"website\": \"https:\\/\\/acme.com\",
\"linkedin\": \"https:\\/\\/linkedin.com\\/in\\/johndoe\",
\"instagram\": \"https:\\/\\/instagram.com\\/johndoe\",
\"facebook\": \"https:\\/\\/facebook.com\\/johndoe\",
\"pinterest\": \"https:\\/\\/pinterest.com\\/johndoe\",
\"city\": \"San Francisco\",
\"state\": \"CA\",
\"zip\": \"94107\",
\"country\": \"United States\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/leads/update/5"
);
const params = {
"isApi": "1",
};
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 = {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"country_code": "+1",
"country_iso_code": "US",
"source_id": 3,
"stage_id": 2,
"assigned_to": 7,
"job_title": "CTO",
"industry": "SaaS",
"company": "Acme Corp",
"website": "https:\/\/acme.com",
"linkedin": "https:\/\/linkedin.com\/in\/johndoe",
"instagram": "https:\/\/instagram.com\/johndoe",
"facebook": "https:\/\/facebook.com\/johndoe",
"pinterest": "https:\/\/pinterest.com\/johndoe",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "United States"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead updated successfully!",
"data": {
"id": 5,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"company": "Acme Corp",
"stage_id": 2,
"source_id": 3,
"assigned_to": 7,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead not found."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"email": [
"The email has already been taken."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the lead."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a specific lead.
requires authentication
This endpoint deletes a specific lead by its ID. The user must be authenticated and have appropriate permissions to perform the deletion.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/leads/destroy/5" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/destroy/5"
);
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": "Lead deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Lead not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the lead."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new lead follow-up.
requires authentication
This endpoint creates a follow-up activity (such as call, email, or meeting) for a specific lead. The date and time are converted to UTC before storing.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/follow-up/store" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"lead_id\": 12,
\"assigned_to\": 5,
\"type\": \"call\",
\"status\": \"pending\",
\"follow_up_at\": \"2025-06-20T14:30\",
\"note\": \"Call scheduled with client to discuss proposal.\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/leads/follow-up/store"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"lead_id": 12,
"assigned_to": 5,
"type": "call",
"status": "pending",
"follow_up_at": "2025-06-20T14:30",
"note": "Call scheduled with client to discuss proposal."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Follow Up Created Successfully",
"data": {
"id": 101,
"type": "lead_follow_up"
}
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"errors": {
"lead_id": [
"The lead id field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "Follow Up Couldn't Created.",
"data": {
"error": "...",
"line": 123,
"file": "/app/Http/Controllers/LeadFollowUpController.php"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific lead follow-up.
requires authentication
This endpoint fetches the details of a lead follow-up for editing or displaying, including the related lead and assigned user.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/leads/follow-up/get/101" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/follow-up/get/101"
);
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": "Follow Up Retrived Successfully",
"follow_up": {
"id": 101,
"lead_id": 12,
"assigned_to": 5,
"type": "call",
"status": "pending",
"follow_up_at": "2025-06-20T09:00:00.000000Z",
"note": "Discuss proposal",
"lead": {
"id": 12,
"first_name": "John",
"last_name": "Doe"
},
"assigned_to_user": {
"id": 5,
"name": "Jane Smith"
}
}
}
Example response (404):
{
"message": "No query results for model [App\\Models\\LeadFollowUp] 101"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing lead follow-up.
requires authentication
This endpoint updates the details of an existing follow-up activity for a lead, including reassignment, type, and follow-up date.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/follow-up/update" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 101,
\"assigned_to\": 6,
\"type\": \"email\",
\"status\": \"completed\",
\"follow_up_at\": \"2025-06-21T16:00\",
\"note\": \"Follow-up completed.\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/leads/follow-up/update"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 101,
"assigned_to": 6,
"type": "email",
"status": "completed",
"follow_up_at": "2025-06-21T16:00",
"note": "Follow-up completed."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Follow Up Updated Successfully",
"data": {
"id": 101,
"type": "lead_follow_up"
}
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"errors": {
"follow_up_at": [
"The follow up at must be a valid date."
]
}
}
Example response (500):
{
"error": true,
"message": "Follow Up Couldn't Be Updated.",
"data": {
"error": "...",
"line": 123,
"file": "/app/Http/Controllers/LeadFollowUpController.php"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a lead follow-up.
requires authentication
This endpoint deletes a follow-up record permanently from the system.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/leads/follow-up/destroy/101" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/follow-up/destroy/101"
);
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": "Lead Follow Up deleted successfully"
}
Example response (404):
{
"error": true,
"message": "Lead Follow Up not found"
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting Lead Follow Up.",
"data": {
"error": "...",
"line": 123,
"file": "/app/Services/DeletionService.php"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Change the stage of a lead.
requires authentication
This endpoint updates the stage of a specific lead by its ID. The user must be authenticated and authorized to modify the lead.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/stage-change?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 123,
\"stage_id\": 5
}"
const url = new URL(
"http://127.0.0.1:8000/api/leads/stage-change"
);
const params = {
"isApi": "1",
};
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 = {
"id": 123,
"stage_id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead stage updated successfully!",
"data": {
"id": 123,
"type": "lead",
"activity_message": "Lead Stage Changed to Negotiation"
}
}
Example response (404):
{
"error": true,
"message": "Lead not found."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"stage_id": [
"The selected stage_id is invalid."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the lead stage."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Convert a lead to a client.
requires authentication
This endpoint converts a lead to a client by creating a new client record with the lead's data. The user must be authenticated, and the lead must not already be converted.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/leads/11/convert-to-client" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/leads/11/convert-to-client"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead converted to client successfully!",
"data": {
"id": 5,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"company": "Acme Corp"
}
}
Example response (400):
{
"error": true,
"message": "Lead is already converted to the client.",
"id": 5
}
Example response (404):
{
"error": true,
"message": "Lead not found."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"email": [
"The email has already been taken."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while converting the lead."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save the default view preference for leads.
requires authentication
This endpoint sets the default view preference (e.g., list or Kanban) for the authenticated user or client when viewing leads.
Example request:
curl --request PUT \
"http://127.0.0.1:8000/api/save-leads-view-preference?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"view\": \"kanban\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/save-leads-view-preference"
);
const params = {
"isApi": "1",
};
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 = {
"view": "kanban"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Default view set successfully!"
}
Example response (500):
{
"error": true,
"message": "An error occurred while setting the default view."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leads Source Management
Create a new lead source.
requires authentication
This endpoint creates a new lead source with the provided name under the current workspace. The user must be authenticated and authorized to manage lead sources.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-sources/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Referral\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-sources/store"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Referral"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead source created successfully!",
"data": {
"id": 1,
"name": "Referral",
"workspace_id": 10,
"created_at": "2025-05-20T10:00:00.000000Z",
"updated_at": "2025-05-20T10:00:00.000000Z"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"name": [
"The name field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the lead source."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific lead source.
requires authentication
This endpoint retrieves the details of a specific lead source by its ID. The user must be authenticated and authorized to manage lead sources.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-sources/get/1?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-sources/get/1"
);
const params = {
"isApi": "1",
};
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": "Lead source retrieved successfully!",
"data": {
"id": 1,
"name": "Referral",
"workspace_id": 10,
"created_at": "2025-05-20T10:00:00.000000Z",
"updated_at": "2025-05-20T10:00:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead source not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead source."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List lead sources with optional filters, sorting, and pagination.
requires authentication
This endpoint retrieves a paginated list of lead sources or a specific lead source by ID, with optional search, sorting, and pagination parameters. The response includes permission details for editing and deletion. The user must be authenticated and authorized to manage lead sources.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-sources/list?id=1&search=Referral&sort=name&order=ASC&limit=20&offset=10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-sources/list"
);
const params = {
"id": "1",
"search": "Referral",
"sort": "name",
"order": "ASC",
"limit": "20",
"offset": "10",
};
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": "Lead sources retrieved successfully!",
"total": 25,
"data": [
{
"id": 1,
"name": "Referral",
"workspace_id": 10,
"created_at": "2025-05-20T10:00:00.000000Z",
"updated_at": "2025-05-20T10:00:00.000000Z",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
Example response (404):
{
"error": false,
"message": "Lead source(s) not found.",
"total": 0,
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead sources."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a specific lead source.
requires authentication
This endpoint updates the name of an existing lead source identified by its ID. The user must be authenticated and authorized to manage lead sources.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-sources/update?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 1,
\"name\": \"Referral\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-sources/update"
);
const params = {
"isApi": "1",
};
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 = {
"id": 1,
"name": "Referral"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead source updated successfully!",
"data": {
"id": 1,
"name": "Referral",
"workspace_id": 10,
"created_at": "2025-05-20T10:00:00.000000Z",
"updated_at": "2025-05-20T10:05:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead source not found."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"id": [
"The selected id is invalid."
],
"name": [
"The name field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the lead source."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a specific lead source.
requires authentication
This endpoint deletes a specific lead source by its ID. The user must be authenticated and authorized to manage lead sources.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/lead-sources/destroy/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-sources/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": "Lead source deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Lead source not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the lead source."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Leads Stage Management
Create a new lead stage.
requires authentication
This endpoint creates a new lead stage within the current workspace. It assigns a unique slug, sets the display order, and saves the provided name and color. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-stages/store?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Contacted\",
\"color\": \"success\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/store"
);
const params = {
"isApi": "1",
};
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 = {
"name": "Contacted",
"color": "success"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead stage created successfully!",
"data": {
"id": 12,
"name": "Contacted",
"slug": "contacted",
"color": "success",
"order": 3,
"workspace_id": 1,
"created_at": "2025-05-15T10:00:00.000000Z",
"updated_at": "2025-05-15T10:00:00.000000Z"
}
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"name": [
"The name field is required."
],
"color": [
"The color field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while creating the lead stage."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List lead stages with optional filters, sorting, and pagination.
requires authentication
This endpoint retrieves a paginated list of lead stages for the current workspace, with optional search, sorting, and pagination parameters. The response includes permission details for editing and deletion. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/lead-stages/list?search=Proposal&sort=name&order=ASC&limit=20" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/list"
);
const params = {
"search": "Proposal",
"sort": "name",
"order": "ASC",
"limit": "20",
};
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": "Lead stages retrieved successfully!",
"data": {
"total": 3,
"data": [
{
"id": 1,
"name": "New Lead",
"slug": "new-lead",
"color": "primary",
"order": 1,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z",
"can_edit": true,
"can_delete": true
},
{
"id": 2,
"name": "Qualified",
"slug": "qualified",
"color": "success",
"order": 2,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z",
"can_edit": true,
"can_delete": true
}
],
"permissions": {
"can_edit": true,
"can_delete": true
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while retrieving the lead stages."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a specific lead stage.
requires authentication
This endpoint updates the details of an existing lead stage, including its name, slug, and color. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-stages/update?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 3,
\"name\": \"Proposal Sent\",
\"color\": \"warning\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/update"
);
const params = {
"isApi": "1",
};
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 = {
"id": 3,
"name": "Proposal Sent",
"color": "warning"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead stage updated successfully!",
"data": {
"id": 3,
"name": "Proposal Sent",
"slug": "proposal-sent",
"color": "warning",
"order": 2,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
}
}
Example response (404):
{
"error": true,
"message": "Lead stage not found."
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"id": [
"The selected id is invalid."
],
"name": [
"The name field is required."
],
"color": [
"The selected color is invalid."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while updating the lead stage."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a specific lead stage.
requires authentication
This endpoint deletes a specific lead stage by its ID and reorders the remaining stages to maintain sequence. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/lead-stages/destroy/4" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/destroy/4"
);
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": "Lead stage deleted successfully!"
}
Example response (404):
{
"error": true,
"message": "Lead stage not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred while deleting the lead stage."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reorder lead stages.
requires authentication
This endpoint updates the order of lead stages based on the provided array of IDs and positions. The user must be authenticated and authorized to manage lead stages.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/lead-stages/reorder?isApi=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"order\": [
{
\"id\": 1,
\"position\": 1
},
{
\"id\": 2,
\"position\": 2
}
]
}"
const url = new URL(
"http://127.0.0.1:8000/api/lead-stages/reorder"
);
const params = {
"isApi": "1",
};
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 = {
"order": [
{
"id": 1,
"position": 1
},
{
"id": 2,
"position": 2
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Lead stages reordered successfully!",
"data": [
{
"id": 1,
"name": "Qualified",
"slug": "qualified",
"color": "success",
"order": 1,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
},
{
"id": 2,
"name": "Contacted",
"slug": "contacted",
"color": "info",
"order": 2,
"workspace_id": 1,
"created_at": "2025-05-10T12:30:00.000000Z",
"updated_at": "2025-05-15T09:12:00.000000Z"
}
]
}
Example response (422):
{
"error": true,
"message": "Validation failed.",
"errors": {
"order": [
"The order field is required."
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred while reordering the lead stages."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Payslip Management
Create a new payslip.
Creates a new payslip with salary details, allowances, and deductions. Requires valid user ID, salary components, and optional payment information if marked as paid.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payslips/store" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"user_id\": 3,
\"month\": \"2025-05\",
\"basic_salary\": 50000,
\"working_days\": 22,
\"lop_days\": 2,
\"paid_days\": 20,
\"bonus\": 2000,
\"incentives\": 1500,
\"leave_deduction\": 500,
\"ot_hours\": 5,
\"ot_rate\": 100,
\"ot_payment\": 500,
\"total_allowance\": 3500,
\"total_deductions\": 500,
\"total_earnings\": 53500,
\"net_pay\": 53000,
\"payment_method_id\": 2,
\"payment_date\": \"2025-05-20\",
\"status\": 1,
\"note\": \"Bonus included for performance.\",
\"allowances\": [
1,
2
],
\"deductions\": [
3,
4
],
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/payslips/store"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"user_id": 3,
"month": "2025-05",
"basic_salary": 50000,
"working_days": 22,
"lop_days": 2,
"paid_days": 20,
"bonus": 2000,
"incentives": 1500,
"leave_deduction": 500,
"ot_hours": 5,
"ot_rate": 100,
"ot_payment": 500,
"total_allowance": 3500,
"total_deductions": 500,
"total_earnings": 53500,
"net_pay": 53000,
"payment_method_id": 2,
"payment_date": "2025-05-20",
"status": 1,
"note": "Bonus included for performance.",
"allowances": [
1,
2
],
"deductions": [
3,
4
],
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payslip created successfully.",
"data": {
"id": 10,
"user_id": 3,
"user_name": "John Doe",
"month": "2025-05-01",
"basic_salary": 50000,
"working_days": 22,
"lop_days": 2,
"paid_days": 20,
"bonus": 2000,
"incentives": 1500,
"leave_deduction": 500,
"ot_hours": 5,
"ot_rate": 100,
"ot_payment": 500,
"total_allowance": 3500,
"total_deductions": 500,
"total_earnings": 53500,
"net_pay": 53000,
"status": 1,
"status_label": "Paid",
"payment_method_id": 2,
"payment_method": "Bank Transfer",
"payment_date": "2025-05-20",
"note": "Bonus included for performance.",
"created_at": "2025-05-15",
"updated_at": "2025-05-15"
}
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"user_id": [
"The user field is required."
],
"basic_salary": [
"The basic salary must be a valid number with or without decimals."
]
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an existing payslip.
Updates an existing payslip by ID with revised salary and payment details. Fields must be validated as in creation.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/payslips/update" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 7,
\"user_id\": 3,
\"month\": \"2025-05\",
\"basic_salary\": 50000,
\"working_days\": 22,
\"lop_days\": 2,
\"paid_days\": 20,
\"bonus\": 2000,
\"incentives\": 1500,
\"leave_deduction\": 500,
\"ot_hours\": 5,
\"ot_rate\": 100,
\"ot_payment\": 500,
\"total_allowance\": 3500,
\"total_deductions\": 500,
\"total_earnings\": 53500,
\"net_pay\": 53000,
\"payment_method_id\": 2,
\"payment_date\": \"2025-05-20\",
\"status\": 1,
\"note\": \"Updated after bonus revision.\",
\"allowances\": [
1,
2
],
\"deductions\": [
3,
4
],
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/payslips/update"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 7,
"user_id": 3,
"month": "2025-05",
"basic_salary": 50000,
"working_days": 22,
"lop_days": 2,
"paid_days": 20,
"bonus": 2000,
"incentives": 1500,
"leave_deduction": 500,
"ot_hours": 5,
"ot_rate": 100,
"ot_payment": 500,
"total_allowance": 3500,
"total_deductions": 500,
"total_earnings": 53500,
"net_pay": 53000,
"payment_method_id": 2,
"payment_date": "2025-05-20",
"status": 1,
"note": "Updated after bonus revision.",
"allowances": [
1,
2
],
"deductions": [
3,
4
],
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Payslip updated successfully.",
"data": {
"id": 7,
"user_id": 3,
"user_name": "John Doe",
"month": "2025-05-01",
"basic_salary": 50000,
"working_days": 22,
"lop_days": 2,
"paid_days": 20,
"bonus": 2000,
"incentives": 1500,
"leave_deduction": 500,
"ot_hours": 5,
"ot_rate": 100,
"ot_payment": 500,
"total_allowance": 3500,
"total_deductions": 500,
"total_earnings": 53500,
"net_pay": 53000,
"status": 1,
"status_label": "Paid",
"payment_method_id": 2,
"payment_method": "Bank Transfer",
"payment_date": "2025-05-20",
"note": "Updated after bonus revision.",
"created_at": "2025-05-15",
"updated_at": "2025-05-15"
}
}
Example response (404):
{
"error": true,
"message": "Payslip not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"user_id": [
"The user field is required."
],
"basic_salary": [
"The basic salary must be a valid number with or without decimals."
]
}
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a payslip.
requires authentication
This endpoint deletes the specified payslip and detaches all associated allowances and deductions.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/payslips/destroy/10" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/payslips/destroy/10"
);
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": "Payslip deleted successfully."
}
Example response (404):
{
"error": true,
"message": "Payslip not found."
}
Example response (500):
{
"error": true,
"message": "An error occurred."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List payslips with filtering (API format).
Retrieves a list of payslips in API format with support for searching, filtering by user, status, and month.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/payslips/list?search=PSL-5&sort=month&order=ASC&limit=20&statuses[]=0&statuses[]=1&user_ids[]=3&user_ids[]=4&created_by_user_ids[]=2&created_by_client_ids[]=1&month=2025-05" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/payslips/list"
);
const params = {
"search": "PSL-5",
"sort": "month",
"order": "ASC",
"limit": "20",
"statuses[0]": "0",
"statuses[1]": "1",
"user_ids[0]": "3",
"user_ids[1]": "4",
"created_by_user_ids[0]": "2",
"created_by_client_ids[0]": "1",
"month": "2025-05",
};
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": "Payslips retrieved successfully.",
"data": {
"total": 5,
"data": [
{
"id": 7,
"user_id": 3,
"user_name": "John Doe",
"month": "2025-05-01",
"basic_salary": 50000,
"working_days": 22,
"lop_days": 2,
"paid_days": 20,
"bonus": 2000,
"incentives": 1500,
"leave_deduction": 500,
"ot_hours": 5,
"ot_rate": 100,
"ot_payment": 500,
"total_allowance": 3500,
"total_deductions": 500,
"total_earnings": 53500,
"net_pay": 53000,
"status": 1,
"status_label": "Paid",
"payment_method_id": 2,
"payment_method": "Bank Transfer",
"payment_date": "2025-05-20",
"note": "Bonus included for performance.",
"created_at": "2025-05-15",
"updated_at": "2025-05-15"
}
]
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Task List Management
Create a new task list.
Creates a new task list associated with a specific project.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/task-lists/store?isApi=1" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"UI Tasks\",
\"project_id\": 5
}"
const url = new URL(
"http://127.0.0.1:8000/api/task-lists/store"
);
const params = {
"isApi": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"name": "UI Tasks",
"project_id": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Task list created successfully.",
"data": {
"id": 1,
"name": "UI Tasks",
"project": "Website Redesign",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"name": [
"The name field is required."
],
"project_id": [
"The selected project id is invalid."
]
}
}
}
Example response (500):
{
"error": true,
"message": "Task list couldn't be created.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update a task list.
Updates the name of an existing task list.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/task-lists/update?isApi=1" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"id\": 1,
\"name\": \"Backend Tasks\"
}"
const url = new URL(
"http://127.0.0.1:8000/api/task-lists/update"
);
const params = {
"isApi": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"id": 1,
"name": "Backend Tasks"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Task list updated successfully.",
"data": {
"id": 1,
"name": "Backend Tasks",
"project": "Website Redesign",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (404):
{
"error": true,
"message": "Task list not found.",
"data": []
}
Example response (422):
{
"error": true,
"message": "The given data was invalid.",
"data": {
"errors": {
"id": [
"The selected id is invalid."
],
"name": [
"The name field is required."
]
}
}
}
Example response (500):
{
"error": true,
"message": "Task lists couldn't be updated.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve a specific task list.
Fetches a task list by its ID, including associated project details.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/task-lists/get/1?isApi=1" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/task-lists/get/1"
);
const params = {
"isApi": "1",
};
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": "Task list retrieved successfully.",
"data": {
"id": 1,
"name": "UI Tasks",
"project": "Website Redesign",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (404):
{
"error": true,
"message": "Task list not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a task list.
Permanently deletes a task list by its ID.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/task-lists/destroy/1?isApi=1" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/task-lists/destroy/1"
);
const params = {
"isApi": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Accept": "application/json",
"workspace-id": "1",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Task list deleted successfully.",
"data": []
}
Example response (404):
{
"error": true,
"message": "Task list not found.",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get list of task lists (API format).
Returns a list of task lists for the current workspace in API format, with optional filtering and sorting.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/task-lists/list?search=UI&sort=name&order=ASC&limit=20" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/task-lists/list"
);
const params = {
"search": "UI",
"sort": "name",
"order": "ASC",
"limit": "20",
};
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": "Task lists retrieved successfully.",
"total": 1,
"data": [
{
"id": 1,
"name": "UI Tasks",
"project": "Website Redesign",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
]
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Time Tracker Management
Start a new time tracker.
Creates a new time tracking record for the authenticated user with the current start time and an optional message.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/time-tracker/store" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"message\": \"Working on project X\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/time-tracker/store"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"message": "Working on project X",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Timer has been started successfully.",
"data": {
"id": 1,
"user": "<a href=\"/users/3\">John Doe</a>",
"start_date_time": "30 May, 2025 14:34:00",
"end_date_time": "-",
"message": "Working on project X",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Stop an existing time tracker.
Updates an existing time tracking record with the current end time and an optional message.
Example request:
curl --request POST \
"http://127.0.0.1:8000/api/time-tracker/update" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"record_id\": 1,
\"message\": \"Completed project X task\",
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/time-tracker/update"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"record_id": 1,
"message": "Completed project X task",
"isApi": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Timer has been stopped successfully.",
"data": {
"id": 1,
"user": "<a href=\"/users/3\">John Doe</a>",
"start_date_time": "30 May, 2025 14:34:00",
"end_date_time": "30 May, 2025 16:34:00",
"message": "Completed project X task",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
}
Example response (404):
{
"error": true,
"message": "No query results for model [App\\Models\\TimeTracker] 9999",
"data": []
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get list of time trackers.
Returns a list of time tracking records for the current workspace in API format, with optional filtering and sorting.
Example request:
curl --request GET \
--get "http://127.0.0.1:8000/api/time-tracker/list?search=project&sort=start_date_time&order=ASC&limit=20&offset=10&user_id=3&date_between_from=2025-05-01&date_between_to=2025-05-31&start_date_from=2025-05-01&start_date_to=2025-05-31&end_date_from=2025-05-01&end_date_to=2025-05-31" \
--header "Accept: application/json" \
--header "workspace-id: 1"const url = new URL(
"http://127.0.0.1:8000/api/time-tracker/list"
);
const params = {
"search": "project",
"sort": "start_date_time",
"order": "ASC",
"limit": "20",
"offset": "10",
"user_id": "3",
"date_between_from": "2025-05-01",
"date_between_to": "2025-05-31",
"start_date_from": "2025-05-01",
"start_date_to": "2025-05-31",
"end_date_from": "2025-05-01",
"end_date_to": "2025-05-31",
};
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": "Record(s) retrieved successfully!",
"total": 1,
"data": [
{
"id": 1,
"user": "<a href=\"/users/3\">John Doe</a>",
"start_date_time": "30 May, 2025 14:34:00",
"end_date_time": "30 May, 2025 16:34:00",
"message": "Working on project X",
"created_at": "30 May, 2025",
"updated_at": "30 May, 2025"
}
]
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
"data": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete a time tracker.
Deletes the specified time tracking record.
Example request:
curl --request DELETE \
"http://127.0.0.1:8000/api/time-tracker/destroy/1" \
--header "Accept: application/json" \
--header "workspace-id: 1" \
--header "Content-Type: application/json" \
--data "{
\"isApi\": true
}"
const url = new URL(
"http://127.0.0.1:8000/api/time-tracker/destroy/1"
);
const headers = {
"Accept": "application/json",
"workspace-id": "1",
"Content-Type": "application/json",
};
let body = {
"isApi": true
};
fetch(url, {
method: "DELETE",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"error": false,
"message": "Record deleted successfully.",
}
Example response (404):
{
"error": true,
"message": "No query results for model [App\\Models\\TimeTracker] 9999",
}
Example response (500):
{
"error": true,
"message": "An error occurred.",
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.