---
title: "Create calendar event"
method: POST
path: "/api/calendar/events"
tags: ["calendar"]
---

# Create calendar event

`POST /api/calendar/events`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/calendar/events`
- Auth: `bearer` (a scheme the document does not define)

Creates an event in the user's OpenCase calendar. Sync to Google/Outlook is not performed by the API in Phase 1.

## Request body

- CreateCalendarEventDto
  - `title` string, required: Event title
  - `description` string: Event description
  - `date` string, required: Start date/time in ISO 8601 format
  - `endDate` string: End date/time in ISO 8601 format
  - `type` 'deadline' | 'hearing' | 'meeting' | 'custom' | 'appointment' | 'conference' | 'training' | 'interview' | 'social' | 'travel': Event type
  - `color` string
  - `location` string
  - `guests` string[]
  - `isAllDay` boolean
  - `visibility` 'default' | 'private' | 'public'
  - `reminder` string
  - `recurrenceRule` 'none' | 'daily' | 'weekly' | 'monthly' | 'yearly'
  - `recurrenceEndDate` string: Recurrence end date in ISO 8601 format
  - `recurrenceCount` number
  - `syncToGoogleCalendar` boolean: Sync to Google Calendar (requires connected calendar)
  - `syncToMicrosoftCalendar` boolean: Sync to Microsoft Outlook (requires connected calendar)

## Response `201`

Event created

## Other responses

- `400`: Validation error
- `401`: Unauthorized

---

[API](https://skmtc.dev/opencase/apis/opencase-backend-api.md) · [All operations](https://skmtc.dev/opencase/apis/opencase-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opencase/apis/opencase-backend-api/revisions/c66ef2d8dc00?raw)
