Introduction
Welcome to the Desklog API documentation! Desklog is a powerful time tracking and project time tracking software designed to help businesses monitor productivity and manage team performance.
Our public API currently focuses on key functionalities, including:
- Viewing and editing user details.
- Managing teams and their configurations.
- Accessing detailed reports, such as attendance and activity logs.
This documentation provides all the necessary information about endpoints, request formats, authentication, and examples to help you efficiently integrate Desklog's features into your systems. Start exploring the Desklog API and streamline your workflow!
Authentication
To use the Desklog API, all requests must be authenticated to ensure secure and authorized access. Desklog uses Bearer Token authentication, which requires including your API token in the request header.
You can find your API integration setup and generate your API token by navigating to: Desklog → Settings → Integration → Desklog Api Integration
Make sure to keep your token secure, as it provides access to your Desklog data. Include this token in the header of every API request to successfully interact with the API.
Authentication Header Format:
API's
The API folder contains all the endpoints available for interacting with the Desklog platform. Each endpoint is designed to perform specific operations, such as retrieving, updating, or managing data related to user details, teams, and reports.
Base URL:
All API requests should be sent to the following base URL:
https://app.desklog.io/api/v2/This folder serves as the central hub for accessing Desklog's public API capabilities, ensuring seamless integration with your applications. Use these endpoints to view and edit user details, manage teams, and retrieve detailed reports like attendance logs.
Ping
The "ping" section in the Desklog API allows users to verify the connectivity and availability of the API server. By sending a request to this endpoint, users can quickly check if the server is responsive and operational, helping them troubleshoot any potential issues with their integration.
Responses
Response Attributes
status boolean
time number
Current UTC timestamp
message string
1
curl --location 'https://app.desklog.io/api/v2/ping'
{
"status": true,
"time": 12346789,
"message": "Ping success"
}
User Profile
The user profile section allows users to retrieve detailed information about a specific user within the Desklog system. By accessing this section, users can view profile information such as user details, preferences, and settings. This section provides a centralized location for user-specific data, simplifying the process of retrieving and updating user information.
Header parameters
Authorization string
This header parameter is used to authenticate the user and authorize access to the user_profile endpoint.
Body parameters
email string Required
This body parameter is used to provide the email address of the user for fetching their profile information.
Responses
Response Attributes
status boolean
message string
data object
id string
name string
email string
active boolean
Archive status of user.
phone string
team_id number
id of team which the user is part of.
team_name string
Name of team which the user is part of.
user_type string
user type of user - admin. manager, team_leader or user
role string
defined role for user
time_zone string
timezone of user
app_and_os string
App version and Os details of user.
1
2
3
4
5
curl --location --request GET 'https://app.desklog.io/api/v2/user_profile' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data-raw '{
"email": "john@doe.com"
}'
{
"status": true,
"message": "success",
"data": {
"id": "1",
"name": "John Doe",
"email": "john@doe.com",
"active": true,
"phone": "123456789",
"team_id": 1,
"team_name": "Team 1",
"user_type": "admin",
"role": "System Admin",
"time_zone": "UTC",
"app_and_os": "desklog_2.21_Windows_11"
}
}
User Profile Update
The user profile update section allows users to update their profile information in Desklog seamlessly. Users can modify their email, name, and phone number to ensure accurate and up-to-date personal details within the platform. This functionality enables users to keep their profiles current and relevant for effective communication and record-keeping.
Header parameters
Authorization string
The authorization token for accessing the API.
Body parameters
email string Required
The email address associated with the user's profile.
new_name string
The new name to be updated for the user's profile.
new_phone number
The new phone number to be updated for the user's profile.
Responses
Response Attributes
status boolean
message string
data object
1
2
3
4
5
6
7
8
curl --location 'https://app.desklog.io/api/v2/user_profile_update' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "john@doe.com",
"new_name": "john doe",
"new_phone": 123123123
}'
{
"status": true,
"message": "User profile successfully updated",
"data": {}
}
User List
The user_list section allows users to retrieve a list of all users within the system. This functionality enables users to easily view and manage user data, such as user IDs, names, and contact information. By accessing this section, users can efficiently maintain and update their user database.
Header parameters
Authorization string
A header parameter containing the authorization token for accessing the user list API endpoint.
Body parameters
status string
user status - active or archived
Enum values: active archive
role array
admin, manager, team_leader or user
tracking_type string
Enum values: app web
Responses
Response Attributes
status boolean
message string
data array
id number
name string
email string
active boolean
Archive status of user.
phone string
team_id number
id of team which the user is part of.
team_name string
Name of team which the user is part of.
user_type string
user type of user - admin. manager, team_leader or user
role string
defined role for user
time_zone string
timezone of user
app_and_os string
App version and Os details of user.
1
2
3
4
5
6
7
8
curl --location --request GET 'https://app.desklog.io/api/v2/user_list' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--header 'Content-Type: application/json' \
--data '{
"status": "active",
"role": {},
"tracking_type": "app"
}'
{
"status": true,
"message": "success",
"data": [
{
"id": 1,
"name": "John Doe",
"email": "john@doe.com",
"active": true,
"phone": "123456789",
"team_id": 1,
"team_name": "Team 1",
"user_type": "admin",
"role": "System Admin",
"time_zone": "UTC",
"app_and_os": "desklog_2.21_Windows_11"
}
]
}
User Register
The "user register" section allows users to create a new user within the Desklog platform. By providing the necessary information, users can easily register and gain access to all features and functionalities offered by Desklog. This API section simplifies the user registration process, enabling seamless onboarding for new users.
Header parameters
Authorization string
This header parameter is used to authenticate the user during the user registration process. It is required for access to the POST /api/v2/user_register endpoint.
Body parameters
user_role number Required
Role id of user - Can be obtained from /user_roles api
email string Required
tracking_selected string Required
preferred tracking type of user
Enum values: app Web
team number
id of team which the user should be placed under.
tracking_type string
employee_id number
punching_id number
jira_account_id string
clickup_id number
Responses
Response Attributes
status boolean
message string
data string
1
2
3
4
5
6
7
8
9
10
11
12
curl --location 'https://app.desklog.io/api/v2/user_register' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data-raw '{
"user_role": 1,
"email": "john@doe.com",
"tracking_selected": "app",
"team": 1,
"employee_id": null,
"punching_id": null,
"jira_account_id": null,
"clickup_id": null
}'
{
"status": true,
"message": "User added successfully",
"data": null
}
Team List
The team list section allows users to retrieve a list of teams within their organization, providing valuable insights into the structure and composition of their workforce. With this information, users can effectively manage team assignments and streamline communication and collaboration within their organization.
Header parameters
Authorization string
Specifies the authentication token needed to access the API endpoint. This parameter is required for every request to the team_list endpoint.
Responses
Response Attributes
status boolean
message string
data array
team_id number
id of team
team_name string
name of team
lead_by number
user id of user who leads the team
added_by boolean
user id of user who created the team
1
2
curl --location 'https://app.desklog.io/api/v2/team_list' \
--header 'Authorization: {{AUTH_TOKEN}}' \
{
"status": true,
"message": "Success",
"data": [
{
"team_id": 1,
"team_name": "RD-1",
"lead_by": 9,
"added_by": 1
}
]
}
Team Create
The team create section allows users to create a new team within the Desklog platform. By providing essential information such as team name, lead, and team members, users can establish a cohesive group for collaboration and project management. This API endpoint streamlines the process of setting up teams, facilitating efficient communication and workflow organization within the system.
Header parameters
Authorization string
The API key used to authenticate the request.
Body parameters
team_name string Required
The name of the team that is being created.
team_member array Required
The user ID of a team member to be added to the team.
lead_by number
The user ID of the team leader who will be creating the team.
Responses
Response Attributes
status boolean
message string
data string
1
2
3
4
5
6
7
8
9
10
curl --location 'https://app.desklog.io/api/v2/team_create' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data '{
"team_name": "Team 1",
"team_member": [
1,
2
],
"lead_by": 1
}'
{
"status": true,
"message": "New team created successfully.",
"data": null
}
Team Details
The team details section allows users to retrieve detailed information about a specific team. By using this API, users can access essential data related to a team, such as member details. This functionality enables seamless collaboration and efficient management within the team.
Header parameters
Authorization string
A header parameter used to authenticate the request and verify the identity of the user making the API call.
Body parameters
team_id number Required
Responses
Response Attributes
status boolean
message string
data object
id number
id of team
team_name string
name of team
lead_by number
user id of user who leads the team
added_by number
user id of user who created the team
members array
user_id number
user id of user
email string
email of user
1
2
3
4
5
curl --location 'https://app.desklog.io/api/v2/team_show' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data '{
"team_id": 1
}'
{
"status": true,
"message": "Success",
"data": {
"id": 1,
"team_name": "Team 1",
"lead_by": 1,
"added_by": 1,
"members": [
{
"user_id": 91,
"email": "john@doe.com"
}
]
}
}
Team Delete
The team delete section allows users to remove a team from Desklog, effectively deleting all associated data and members. By utilizing this API endpoint, users can effectively manage their teams and maintain accurate records within the Desklog platform.
Header parameters
Authorization string
The Authorization header parameter is used to authenticate the request and must contain a valid token for the API to process the team deletion.
Body parameters
team_id number Required
The team_id body parameter specifies the unique identifier of the team that is to be deleted from the system.
Responses
Response Attributes
status boolean
message string
data string
1
2
3
4
5
curl --location 'https://app.desklog.io/api/v2/team_delete' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data '{
"team_id": 1
}'
{
"status": true,
"message": "Team has been deleted successfully!",
"data": null
}
Rename Team
The "rename_team" section allows users to update the name of a specific team within the Desklog platform. By using this API feature, users can easily customize the team name to better reflect their organization's structure or branding. This functionality enhances the overall user experience and ensures that team information remains up-to-date and relevant.
Header parameters
Authorization string
The Authorization header parameter contains the authentication token required to access the rename_team endpoint.
Body parameters
team_id number Required
The team_id body parameter specifies the unique identifier of the team that is to be renamed.
team_name string Required
The team_name body parameter represents the new name that will be assigned to the team identified by team_id.
Responses
Response Attributes
status boolean
message string
data string
1
2
3
4
5
6
curl --location 'https://app.desklog.io/api/v2/rename_team' \
--header 'Authorization: {{AUTH_TOKEN}}' \
--data '{
"team_id": 1,
"team_name": "Team Name"
}'
{
"status": true,
"message": "Team Name Changed",
"data": null
}
Add Team Member
The "add team member" section allows users to seamlessly add new members to their team within the Desklog system. By utilizing this functionality, users can easily expand their team and streamline collaboration with new members. This API section simplifies the process of onboarding new team members, enhancing efficiency and productivity within the organization.
Header parameters
Authorization string
A header parameter that contains the authentication token for the request.
Body parameters
team_id number Required
A body parameter that specifies the ID of the team to which the new member will be added.
new_member array Required
A body parameter that provides the details of the new member being added to the team.
Responses
Response Attributes
status boolean
message string
data string
{
"status": true,
"message": "Team Name Changed",
"data": null
}
Remove Team Member
The "remove team member" section allows users to efficiently manage their team by removing a specific member from a designated team. By utilizing this functionality, users can streamline team organization and access control within their project or organization. This section facilitates the smooth handling of team member changes and permissions.
Header parameters
Authorization string
The Authorization header parameter is used to authenticate the request and verify the identity of the user making the API call
Body parameters
team_id number Required
The team_id body parameter specifies the unique identifier of the team from which the member will be removed.
member_id number Required
The member_id body parameter specifies the unique identifier of the team member to be removed from the specified team.
Responses
Response Attributes
status boolean
message string
data string
{
"status": true,
"message": "Team Name Changed",
"data": null
}
Attendance Report
The "attendance report" section in the Desklog API allows users to generate detailed reports of employee attendance within a specified date range. With this feature, users can track and analyze attendance data to gain insights into workforce patterns and trends. This section provides valuable information for monitoring employee attendance and improving overall productivity.
Header parameters
Authorization string
A security token to authorize access to the attendance report API endpoint.
Body parameters
from_date string Required
Specifies the start date for the attendance report to be generated.
to_date string Required
Specifies the end date for the attendance report to be generated.
user_id integer
user id of user. If given, report will be showed for the particular user.
Responses
Response Attributes
status boolean
message string
data array
team_id number
user id of user.
employee_id string
employee id of user.
name string
name of user.
email string
email of user.
team_name string
name of team which user is part of.
clock_in string
Clock in time of user. (If given a date range, average will be provided).
clock_out string
Clock out time of user. (If given a date range, average will be provided).
time_at_work string
Total worked time of user.
productive_time string
Total productive time of user.
focus_time string
Total focus time of user.
idle_time string
Total idle time of user.
private_time string
Total private time of user.
neutral_time string
Total neutral time of user.
non_productive_time string
Total non productive time of user.
over_time string
Total over time of user.
minimum_working_hours string
Minimum working hours of user.
activity_percentage number
Activity percentage of user.
efficiency_percentage string
Efficiency percentage of user.
task_assigned_time string
Total task assigned time of user.
task_spent_time string
Total task spent time of user.
isWorkWithIdle number
Whether time at work includes idle time or not
time_zone string
Time zone of user
client_app_details string
App version and Os details details of user
{
"status": true,
"message": "Success",
"data": [
{
"user_id": 1,
"employee_id": "1",
"name": "John Doe",
"email": "john@doe.com",
"team_name": "Team 1",
"clock_in": "11:31 AM",
"clock_out": "01:56 PM",
"time_at_work": "02h 30m",
"productive_time": "02h 15m",
"focus_time": "02h 30m",
"idle_time": "--",
"private_time": "--",
"neutral_time": "00h 15m",
"non_productive_time": "--",
"over_time": "--",
"minimum_working_hours": "08h 00m",
"activity_percentage": 80,
"efficiency_percentage": "--",
"task_assigned_time": "08h 00m",
"task_spent_time": "10h 28m",
"isWorkWithIdle": 1,
"time_zone": "Asia/Kolkata",
"client_app_details": "desklog_2.21_Windows_11"
}
]
}