Skip to main content

Get User Calendar

GET /:username/calendar​

Description​

Returns a contribution-style calendar summary for a user's posts, tasks, and events over a date range.

Request Parameters​

Requires Authentication: true​

PATH PARAMS​

NameTypeRequiredDescription
usernamestringYesTarget username.

QUERY PARAMS​

NameTypeRequiredDescription
daysnumberNoRolling range. Defaults to 365, minimum 7, maximum 3650.
startDatestringNoCustom range start date in a format accepted by Date.
endDatestringNoRange end date in a format accepted by Date. Defaults to now.
scopestringNoUse all to return from account creation through the end date.

Usage Example​

await axios.get("https://api.daykeeper.app/johndoe/calendar?days=90", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})

Success Response​

{
"message": "calendar fetched successfully",
"data": {
"userId": "65cbaab84b9d1cce41e98b60",
"username": "johndoe",
"timeZone": "America/New_York",
"days": 90,
"from": "2026-01-01",
"to": "2026-03-31",
"range": {
"scope": "rolling",
"startDate": "2026-01-01",
"endDate": "2026-03-31"
},
"totalCount": 12,
"maxCount": 3,
"points": [
{
"date": "2026-01-01",
"count": 1,
"postsCount": 1,
"tasksCount": 0,
"eventsCount": 0,
"level": 2
}
]
}
}

Error Response​

CodeDescription
401Missing or invalid access token
402One of the users is blocked
404User not found
409Private account route not accessible to the viewer
401Invalid startDate or endDate value handling may return invalid-value style errors
500Server error