POST
Create a time entry for a project
Scope:
projects:projects.writehttps://api.holded.com/api/v2/projects/{projectId}/timesCreates a new project time tracking entry. The response returns the new time entry `id`. The cost is not part of the request: it is taken from the project's cost configuration for the member (or category).
Parameters
Path parameters
projectId
stringrequiredProject ID
Request body
object
durationintegerrequired
Duration in seconds
user_idstringoptional
User id of the person whose time this is. Required on direct API calls; when omitted, the assistant resolves the acting user automatically. Set it explicitly to log time for another account team member.
descriptionstring | nulloptional
Description
datestring<date> | nulloptional
Date in ISO 8601
task_idstring | nulloptional
Task ID
categorystring | nulloptional
Category
Request
python
import requests
url = "https://api.holded.com/api/v2/projects/{projectId}/times"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"duration": 0,
"user_id": "string",
"description": "string",
"date": "2024-01-15",
"task_id": "string",
"category": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
json
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201Time entry createdapplication/jsonobject
idstring
Error responses
400Bad requestapplication/json401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json422Validation errorapplication/json429Rate limit exceededapplication/json