Skip to main content

Create Task

POST /day/task​

Description​

Creates either a dated task or a daily task template for the authenticated user.

Request Parameters​

Requires Authentication: true​

BODY​

NameTypeRequiredDescription
titlestringYesTask title.
datestringNoRequired for normal tasks. Use an ISO string. Do not send it when daily is true.
completedbooleanNoInitial completion state for normal tasks. Defaults to false.
privacystringNopublic, private, or close friends.
dailybooleanNoSet to true to create a reusable daily task template.

Usage Example​

await axios.post(
"https://api.daykeeper.app/day/task",
{
title: "Read 20 pages",
date: "2026-03-18T12:00:00.000Z",
privacy: "private"
},
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response​

{
"message": "Day Task created successfully",
"task": {
"_id": "67d9c2b7cc9e4db02fca1028",
"title": "Read 20 pages",
"daily": false,
"completed": false
}
}

Error Response​

CodeDescription
400Missing or invalid fields
401Missing or invalid access token
413Title too long
500Server error