Skip to main content

Get Event

GET /day/event/:eventId

Description

Returns a single event if the authenticated viewer is allowed to access it.

Request Parameters

Requires Authentication: true

PATH PARAMS

NameTypeRequiredDescription
eventIdstringYesMongoDB event ID.

Usage Example

await axios.get(
"https://api.daykeeper.app/day/event/67d9c0d4cc9e4db02fca1001",
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response

{
"message": "event fetched successfully",
"data": {
"_id": "67d9c0d4cc9e4db02fca1001",
"title": "Dinner with friends",
"privacy": "close friends"
}
}

Error Response

CodeDescription
400Invalid event ID
401Missing or invalid access token
404Event not found or not visible to the viewer
500Server error