Create a time entry for a project
Scope: projects:projects.write https://api.alladdin.com/api/v2/projects/{projectId}/times
Creates a new project time tracking entry.
The response returns the new time entry id.
Parameters
Path parameters
projectId string required
Project ID
Request body
object duration integer required
Duration in seconds
user_id string optional
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.
description string | null optional
Description
date string<date> | null optional
Date in ISO 8601
task_id string | null optional
Task ID
cost_per_hour string | null optional
Cost per hour
category string | null optional
Category
Request
import requests
url = "https://api.alladdin.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",
"cost_per_hour": "string",
"category": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Responses
Response
{
"id": "507f1f77bcf86cd799439011"
}Success responses
201 Time entry created application/json object id string
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 422 Validation error application/json 429 Rate limit exceeded application/json
