Delete a task
Deletes a leaf task that has no time registrations, together with its allocations and instalments.
Removes the task from its project plan. Refused (400) when the task has sub-tasks or milestones, time registrations, an invoiced or booked payment, revenue vouchers, is a customer's standard travel task, or is a TDR task in a completed contract with vouchers. On success the task's allocations are deleted, its instalments removed (time-and-material-basic tasks and TDR fixed-price-payment tasks), the remaining tasks are renumbered and the project is re-saved. Baselines, help-desk cases and forecast lines that point at the task are left as they are. Answers 200 with null. Not atomic.
Use it to:
- Remove a task created by mistake (e.g. by a sync) before anyone registered time on it
Not for:
- Tasks with registrations — close them instead:
PUT /v1/task/{taskID}with Status 3 (Completed) or 4 (Cancelled) - A dry run →
POST /v1/task/{taskID}/validate-delete-task
Behaviour:
- Not idempotent.
- Safe to retry only under a condition. A second DELETE answers 500 / 37001. After a 500 or a timeout, GET /v1/task/{taskID}: a 500 / 37001 there means the task is gone.
- Side effect: Deletes every allocation on the task (audit log + e-mail event per allocation) and clears the task's HasAllocations flag.
- Side effect: Time-and-material-basic tasks (not fixed price) and TDR fixed-price-payment tasks: deletes the task's instalments from the billing plan. TDR overall-payment-plan tasks: releases the payment linked to the task.
- Side effect: Deletes the task row and its task search row; notifies invoicing; deletes Task external-ID mappings.
- Side effect: Renumbers the project plan (RemoveTaskOnProject). When the parent has no children left, rebuilds the parent's payment; when the task was the last child of a contract sub-group, the group flag is cleared.
- Side effect: Re-saves the project: project dates may be re-aligned to the plan, invoicing potential recalculated, billing plan saved.
- Side effect: Left untouched (by design, XML remark): baselines, help-desk cases and forecast lines pointing at the task.
- On failure: If the project save after the delete throws, the task is deleted, the remaining tasks keep their old WBS numbers and the call answers 500 (logged as a warning).
- Changes are visible to the next read immediately.
Call first: GET /v1/task, POST /v1/task/{taskID}/validate-delete-task
Next: GET /v1/task
See also: PUT /v1/task/{taskID}
Not yet documented: behaviour → side effects; examples.
curl -X DELETE "https://app3.timelog.com/your-account/api/v1/task/123" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://app3.timelog.com/your-account/api/v1/task/123"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.delete(url, headers=headers)
print(response.json())
const response = await fetch("https://app3.timelog.com/your-account/api/v1/task/123", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("DELETE", "https://app3.timelog.com/your-account/api/v1/task/123", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app3.timelog.com/your-account/api/v1/task/123')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
"null"
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v1/task/{taskID}Target server for requests. Edit to use your own host.
OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.
Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.The task to delete. Route constraint :int.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
Not yet documented: how to obtain a token.
Not yet documented: token lifetime.
Path Parameters
The task to delete. Route constraint :int.
Responses
Success without content: HTTP 200 with the literal JSON body null. The literal null: the task was deleted and the project re-saved.