Skip to main content

Edit Event

PUT /day/event/:eventId

Description

Updates an event owned by the authenticated user.

Request Parameters

Requires Authentication: true

PATH PARAMS

NameTypeRequiredDescription
eventIdstringYesMongoDB event ID.

BODY

At least one field must be provided.

NameTypeRequiredDescription
titlestringNoNew title.
descriptionstringNoNew description.
privacystringNopublic, private, or close friends.
dateStartstringNoNew ISO start date/time.
dateEndstringNoNew ISO end date/time.

Usage Example

await axios.put(
"https://api.daykeeper.app/day/event/67d9c0d4cc9e4db02fca1001",
{
title: "Dinner and drinks",
dateEnd: "2026-03-18T22:00:00.000Z"
},
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response

{
"message": "Day Event updated successfully",
"event": {
"_id": "67d9c0d4cc9e4db02fca1001",
"title": "Dinner and drinks"
}
}

Error Response

CodeDescription
400Invalid event ID or no fields to update
401Missing or invalid access token
404Event not found
500Server error