Delete a time booking
Soft deletes a time booking entry. The entry is marked as deleted but not permanently removed from the database.
Who can delete time bookings:
- You can always delete your own time bookings
- If you have the “deleteAnyTimeLog” permission, you can delete any time booking in the workspace
- Otherwise, you cannot delete time bookings created by other users
How it works:
- The time booking is soft deleted (marked as deleted, not permanently removed)
- Deleted entries are no longer visible in time tracking grids and reports
- The system validates that the time booking exists and belongs to your workspace
- If the time booking was linked to a task, the task’s total time will be recalculated
Use cases:
- Removing accidentally created duplicate entries
- Deleting time logged to the wrong task or project
- Cleaning up test or incorrect time entries
DELETE
/timebookings/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredResponses
200Time booking deleted successfully
successboolean401Unauthorized - Invalid or missing authentication token
403Missing permission to delete this time booking
404Time booking not found
Request
curl -X DELETE "https://leadtime.app/api/public/timebookings/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/timebookings/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/timebookings/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Missing permission to delete this time booking
Time booking not found