curl --request POST \
--url https://api.example.com/api/tasks \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"projectId": 123,
"taskTypeId": 123
}
'{
"id": 123,
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"position": 123,
"projectId": 123,
"taskTypeId": 123,
"userId": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}Create a new task for the authenticated user
curl --request POST \
--url https://api.example.com/api/tasks \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"projectId": 123,
"taskTypeId": 123
}
'{
"id": 123,
"title": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"position": 123,
"projectId": 123,
"taskTypeId": 123,
"userId": 123,
"createdAt": "<string>",
"updatedAt": "<string>"
}curl -X POST https://api.dailytracker.com/api/tasks \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"title": "Implement user authentication",
"description": "Add JWT-based authentication to the API",
"status": "TODO",
"priority": "HIGH",
"projectId": 5,
"taskTypeId": 2
}'
{
"id": 15,
"title": "Implement user authentication",
"description": "Add JWT-based authentication to the API",
"status": "TODO",
"priority": "HIGH",
"position": 1,
"projectId": 5,
"taskTypeId": 2,
"userId": 123,
"createdAt": "2026-03-09T15:30:00Z",
"updatedAt": "2026-03-09T15:30:00Z"
}
{
"error": "Bad Request",
"message": "Validation failed",
"details": [
"title: must not be blank",
"status: must not be blank"
]
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}