---
title: "Extract calendar entries from an image, PDF or DOCX file. Returns incomplete-time drafts as unscheduled_entries, timed one-offs as events, and timed recurrences as event_series without expanding recurrences. This endpoint is stateless and never writes records."
method: POST
path: "/day-plan/import/file"
tags: ["day-plan"]
---

# Extract calendar entries from an image, PDF or DOCX file. Returns incomplete-time drafts as unscheduled_entries, timed one-offs as events, and timed recurrences as event_series without expanding recurrences. This endpoint is stateless and never writes records.

`POST /day-plan/import/file`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/day-plan/import/file`
- Auth: HTTP bearer

## Request body

- ImportFileDto
  - `key` string, required: R2 object key returned by a Day Plan calendar import upload-url endpoint
  - `client_datetime_iso` string: Client-local ISO 8601 datetime used to resolve relative calendar entries
  - `repeated_events_end_on` string: ISO calendar date (yyyy-MM-dd). Providing it enables recurrence detection and sets the requested inclusive end date for recurring drafts.

## Response `200`

- DayPlanImportResponseDto
  - `unscheduled_entries` DayPlanImportUnscheduledEntryDto[], required: Drafts missing a complete time range. Let the user add times or discard them; do not create todos automatically.
    - `title` string, required: Short label for the entry
    - `date` string, required: ISO calendar date (yyyy-MM-dd)
    - `start_time` string, nullable, required: 24-hour start time (HH:mm), or null if not shown
    - `end_time` string, nullable, required: 24-hour end time (HH:mm), or null if not shown
    - `confidence` number, required: Model confidence for this row, 0..1
    - `repeat` 'none' | 'daily' | 'weekly' | 'fortnightly', required: Detected recurrence frequency to retain while the dashboard collects missing times
    - `repeat_end_on` string, nullable, required: Effective inclusive recurrence end date, or null for a non-recurring entry
  - `events` DayPlanImportEventDto[], required: Timed non-recurring drafts to review before POST /day-plan/events
    - `title` string, required: Short label for the entry
    - `date` string, required: ISO calendar date (yyyy-MM-dd)
    - `start_time` string, nullable, required: 24-hour start time (HH:mm), or null if not shown
    - `end_time` string, nullable, required: 24-hour end time (HH:mm), or null if not shown
    - `confidence` number, required: Model confidence for this row, 0..1
  - `event_series` DayPlanImportEventSeriesDto[], required: Editable timed recurrence drafts to review before calling POST /day-plan/event-series
    - `title` string, required: Short label for the recurring entry
    - `date` string, required: First occurrence date (yyyy-MM-dd)
    - `start_time` string, required: First occurrence start time (HH:mm)
    - `end_time` string, required: First occurrence end time (HH:mm)
    - `confidence` number, required: Model confidence for this draft, 0..1
    - `repeat` 'daily' | 'weekly' | 'fortnightly', required: Detected recurrence frequency for dashboard review and later RRULE conversion
    - `repeat_end_on` string, required: Effective inclusive recurrence end date, capped at 366 days after the first occurrence
  - `truncated` boolean, required: True when unique model drafts exceeded the shared 500-draft response limit.

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
