Calendars
A calendar is a named container that events belong to — a personal calendar, a branch's hearing calendar, a holiday calendar, and so on.
The calendar model
- Name
id- Type
- string
- Description
Unique UUID identifier for the calendar.
- Name
name- Type
- string
- Description
The calendar's display name.
- Name
type- Type
- string
- Description
One of
Personal,Holiday,Events,case load,Court,Hearing Room.
- Name
color- Type
- string
- Description
Hex color used to render events on this calendar, e.g.
#3B82F6.
- Name
is_default- Type
- boolean
- Description
Whether this is the owner's default calendar.
- Name
is_shared- Type
- boolean
- Description
Whether this calendar is visible to other users (e.g. a branch calendar shared with its staff).
- Name
entity_type- Type
- string | null
- Description
The owning entity's class, when the calendar belongs to something other than a
User(e.g.CourtBranchfor a branch's hearing calendar).
- Name
entity_id- Type
- string | null
- Description
The owning entity's id.
- Name
user_id- Type
- string
- Description
The user who owns/created the calendar. Enforced on update — you cannot update a calendar you don't own.
List calendars
Retrieve calendars visible to the authenticated user.
Request
curl https://your-domain.com/api/calendars \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"data": [
{
"id": "8a7b6c5d-4e3f-2109-8a7b-6c5d4e3f2109",
"name": "My Calendar",
"type": "Personal",
"color": "#3B82F6",
"is_default": true,
"is_shared": false,
"user_id": "1a2b3c4d-5e6f-7890-1a2b-3c4d5e6f7890"
}
]
}
Create a calendar
Required attributes
- Name
name- Type
- string
- Description
The calendar's display name.
- Name
type- Type
- string
- Description
One of
Personal,Holiday,Events,case load,Court,Hearing Room.
- Name
color- Type
- string
- Description
A valid hex color.
Request
curl -X POST https://your-domain.com/api/calendars \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"name": "Case Load", "type": "case load", "color": "#F59E0B"}'
Response
{
"data": {
"id": "7c6d5e4f-3a2b-1098-7c6d-5e4f3a2b1098",
"name": "Case Load",
"type": "case load",
"color": "#F59E0B",
"is_default": false,
"created_at": "2026-02-20T10:30:00+00:00"
}
}
Update a calendar
Update a calendar you own. Attempting to update a calendar owned by another user returns 403 Forbidden.
Path parameters
- Name
calendar- Type
- string
- Description
The UUID of the calendar to update.
Request
curl -X PUT https://your-domain.com/api/calendars/7c6d5e4f-3a2b-1098-7c6d-5e4f3a2b1098 \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"name": "Case Load", "type": "case load", "color": "#EF4444"}'
Response
{
"data": {
"id": "7c6d5e4f-3a2b-1098-7c6d-5e4f3a2b1098",
"color": "#EF4444",
"updated_at": "2026-02-20T11:00:00+00:00"
}
}
Error - Not Owner (403)
{
"message": "This action is unauthorized."
}
Delete a calendar
Delete a calendar you own.
Path parameters
- Name
calendar- Type
- string
- Description
The UUID of the calendar to delete.
Request
curl -X DELETE https://your-domain.com/api/calendars/7c6d5e4f-3a2b-1098-7c6d-5e4f3a2b1098 \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"message": "Calendar deleted successfully."
}