Skip to content

calendar

Calendar models for the Open WebUI scheduling system.

Calendars contain events with optional recurrence (RRULE), attendees with RSVP status, and access-control grants for sharing. A virtual "Scheduled Tasks" calendar (__scheduled_tasks__) surfaces automation runs as read-only events.

Classes

CalendarModel

Bases: BaseModel

A user-owned or shared calendar.

The virtual Scheduled Tasks calendar has is_system=True and a fixed id of __scheduled_tasks__. All other calendars are user-created.

Attributes

id
id: str

Unique identifier (UUID), or __scheduled_tasks__ for the system calendar.

user_id
user_id: str

ID of the owning user.

name
name: str

Display name of the calendar.

color
color: Optional[str] = None

CSS color string for the calendar, e.g. #3b82f6.

is_default
is_default: bool = False

Whether this is the user's default calendar. Only one default per user.

is_system
is_system: bool = False

True for the virtual Scheduled Tasks calendar, False for user-created.

data
data: Optional[dict[str, Any]] = None

Arbitrary calendar data.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Arbitrary calendar metadata.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

access_grants
access_grants: list[Any] = Field(default_factory=list)

List of access grants controlling sharing. Each grant is a dict.

Dict Fields
  • target_type (str, required): Grant target type, e.g. 'user' or 'group'
  • target_id (str, required): ID of the user or group
  • permission (str, required): 'read' or 'write'
created_at
created_at: int

Timestamp (nanoseconds since epoch) of creation.

updated_at
updated_at: int

Timestamp (nanoseconds since epoch) of last update.

CalendarEventAttendeeModel

Bases: BaseModel

An attendee on a calendar event with RSVP status.

Attributes

id
id: str

Unique identifier (UUID).

event_id
event_id: str

ID of the parent event.

user_id
user_id: str

ID of the attendee user.

status
status: str = 'pending'

RSVP status: 'accepted', 'declined', 'tentative', or 'pending'.

meta
meta: Optional[dict[str, Any]] = None

Arbitrary attendee metadata.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

created_at
created_at: int

Timestamp (nanoseconds since epoch) of creation.

updated_at
updated_at: int

Timestamp (nanoseconds since epoch) of last update.

CalendarEventModel

Bases: BaseModel

A calendar event with optional recurrence and attendees.

Timestamps are nanoseconds since epoch. Recurring events use an RRULE string (RFC 5545); the backend expands instances server-side.

Attributes

id
id: str

Unique identifier (UUID), or auto_{id}/run_{id} for virtual events.

calendar_id
calendar_id: str

ID of the parent calendar, or __scheduled_tasks__ for virtual events.

user_id
user_id: str

ID of the event creator.

title
title: str

Event title.

description
description: Optional[str] = None

Event description or notes.

start_at
start_at: int

Start time as nanoseconds since epoch.

end_at
end_at: Optional[int] = None

End time as nanoseconds since epoch. Null for point events.

all_day
all_day: bool = False

Whether this is an all-day event.

rrule
rrule: Optional[str] = None

RRULE recurrence rule (RFC 5545), e.g. FREQ=DAILY;DTSTART=20260101T090000Z.

color
color: Optional[str] = None

CSS color override for this event, e.g. #ef4444.

location
location: Optional[str] = None

Event location string.

data
data: Optional[dict[str, Any]] = None

Arbitrary event data.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Event metadata.

Dict Fields
  • alert_minutes (int, optional): Minutes before event to send a reminder. 0 = at time of event, -1 = no reminder. Defaults to 10 if absent.
  • automation_id (str, optional): Set on virtual Scheduled Tasks events to link back to the source automation.
  • run_id (str, optional): Set on virtual past-run events to link to the automation run record.
  • chat_id (str, optional): Set on virtual past-run events for the associated chat.
  • status (str, optional): Set on virtual past-run events, 'success' or 'error'.
is_cancelled
is_cancelled: bool = False

Whether the event has been cancelled.

attendees
attendees: list[CalendarEventAttendeeModel] = Field(
    default_factory=list
)

List of event attendees with RSVP status.

created_at
created_at: int

Timestamp (nanoseconds since epoch) of creation.

updated_at
updated_at: int

Timestamp (nanoseconds since epoch) of last update.

CalendarForm

Bases: BaseModel

Form for creating a new calendar.

Attributes

name
name: str

Display name of the calendar.

color
color: Optional[str] = None

CSS color string, e.g. #3b82f6.

data
data: Optional[dict[str, Any]] = None

Arbitrary calendar data.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Arbitrary calendar metadata.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

access_grants
access_grants: Optional[list[dict[str, Any]]] = None

Access grants for sharing the calendar. Each dict defines a grant.

Dict Fields
  • target_type (str, required): Grant target type, e.g. 'user' or 'group'
  • target_id (str, required): ID of the user or group
  • permission (str, required): 'read' or 'write'

CalendarUpdateForm

Bases: BaseModel

Form for updating an existing calendar. Only set fields are applied.

Attributes

name
name: Optional[str] = None

New display name.

color
color: Optional[str] = None

New CSS color string.

data
data: Optional[dict[str, Any]] = None

Merged into existing data. New keys overwrite old ones.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Merged into existing metadata. New keys overwrite old ones.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

access_grants
access_grants: Optional[list[dict[str, Any]]] = None

Replaces all existing access grants. Each dict defines a grant.

Dict Fields
  • target_type (str, required): Grant target type, e.g. 'user' or 'group'
  • target_id (str, required): ID of the user or group
  • permission (str, required): 'read' or 'write'

CalendarEventForm

Bases: BaseModel

Form for creating a new calendar event.

Attributes

calendar_id
calendar_id: str

ID of the calendar to create the event in.

title
title: str

Event title.

description
description: Optional[str] = None

Event description or notes.

start_at
start_at: int

Start time as nanoseconds since epoch.

end_at
end_at: Optional[int] = None

End time as nanoseconds since epoch. Null for point events.

all_day
all_day: bool = False

Whether this is an all-day event.

rrule
rrule: Optional[str] = None

RRULE recurrence rule (RFC 5545), e.g. FREQ=WEEKLY;DTSTART=20260101T090000Z.

color
color: Optional[str] = None

CSS color override for this event.

location
location: Optional[str] = None

Event location string.

data
data: Optional[dict[str, Any]] = None

Arbitrary event data.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Event metadata.

Dict Fields
  • alert_minutes (int, optional): Minutes before event to send a reminder. 0 = at time of event, -1 = no reminder. Defaults to 10 if absent.
attendees
attendees: Optional[list[dict[str, Any]]] = None

Attendees to add to the event. Each dict defines an attendee.

Dict Fields
  • user_id (str, required): ID of the attendee user
  • status (str, optional): RSVP status, defaults to 'pending'
  • meta (dict, optional): Arbitrary attendee metadata

CalendarEventUpdateForm

Bases: BaseModel

Form for updating an existing calendar event. Only set fields are applied.

Attributes

calendar_id
calendar_id: Optional[str] = None

Move event to a different calendar.

title
title: Optional[str] = None

New event title.

description
description: Optional[str] = None

New event description.

start_at
start_at: Optional[int] = None

New start time as nanoseconds since epoch.

end_at
end_at: Optional[int] = None

New end time as nanoseconds since epoch.

all_day
all_day: Optional[bool] = None

Whether this is an all-day event.

rrule
rrule: Optional[str] = None

New RRULE recurrence rule, or null to remove recurrence.

color
color: Optional[str] = None

New CSS color override.

location
location: Optional[str] = None

New event location.

data
data: Optional[dict[str, Any]] = None

Merged into existing data. New keys overwrite old ones.

Dict Fields

Reserved for future use. No keys are currently read by the backend.

meta
meta: Optional[dict[str, Any]] = None

Merged into existing metadata. New keys overwrite old ones.

Dict Fields
  • alert_minutes (int, optional): Minutes before event to send a reminder. 0 = at time of event, -1 = no reminder. Defaults to 10 if absent.
is_cancelled
is_cancelled: Optional[bool] = None

Set to True to cancel the event.

attendees
attendees: Optional[list[dict[str, Any]]] = None

Replaces all existing attendees. Each dict defines an attendee.

Dict Fields
  • user_id (str, required): ID of the attendee user
  • status (str, optional): RSVP status, defaults to 'pending'
  • meta (dict, optional): Arbitrary attendee metadata

RSVPForm

Bases: BaseModel

Form for updating RSVP status on an event.

Attributes

status
status: str

RSVP status: 'accepted', 'declined', 'tentative', or 'pending'.

CalendarEventUserResponse

Bases: CalendarEventModel

Calendar event enriched with the creator's user profile.

Attributes

user
user: Optional[Any] = None

User profile of the event creator. Structure matches UserResponse.

CalendarEventListResponse

Bases: BaseModel

Paginated list of calendar events with enriched user data.

Attributes

items
items: list[CalendarEventUserResponse] = []

List of events in the current page.

total
total: int = 0

Total number of events matching the query before pagination.