List Holidays (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/holidays
Description
Retrieve all holidays for a workspace.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Response 200 OK
{
"holidays": [
{
"id": "507f1f77bcf86cd799439011",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "New Year's Day",
"date": "2025-01-01T00:00:00.000Z",
"isRecurring": false,
"recurrenceRule": null,
"createdAt": "2024-12-01T10:00:00.000Z",
"updatedAt": "2024-12-01T10:00:00.000Z"
},
{
"id": "507f1f77bcf86cd799439013",
"workspaceId": "507f1f77bcf86cd799439012",
"name": "Every Friday",
"date": "2025-01-03T00:00:00.000Z",
"isRecurring": true,
"recurrenceRule": {
"frequency": "weekly",
"dayOfWeek": 5
},
"createdAt": "2024-12-01T10:00:00.000Z",
"updatedAt": "2024-12-01T10:00:00.000Z"
}
]
}
Response Fields
holidays
Array of holiday objects with the following fields:
id(string): Unique holiday identifierworkspaceId(string): Workspace identifiername(string): Holiday namedate(string): Holiday date (ISO 8601 format)isRecurring(boolean): Whether the holiday recursrecurrenceRule(object | null): Recurrence rule ifisRecurringis truefrequency(string): Recurrence frequency (daily,weekly,monthly,yearly)dayOfWeek(number | null): Day of week (0-6, Sunday-Saturday) for weekly recurrence
createdAt(string): Creation timestamp (ISO 8601 format)updatedAt(string): Last update timestamp (ISO 8601 format)
Common Errors
401 Unauthorized: Missing or invalid authentication token
403 Forbidden: User does not have permission to view holidays
404 Not Found: Workspace not found
500 Internal Server Error: Server error occurred while processing the request
Notes
- Holidays are returned in chronological order
- Recurring holidays show the next occurrence date
- Workspace subscription status is checked before processing the request