---
title: "Generate a presigned URL for uploading a transient calendar image, PDF or DOCX file"
method: POST
path: "/day-plan/import/file/generate-upload-url"
tags: ["day-plan"]
---

# Generate a presigned URL for uploading a transient calendar image, PDF or DOCX file

`POST /day-plan/import/file/generate-upload-url`

## 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/generate-upload-url`
- Auth: HTTP bearer

## Request body

- GenerateFileImportUploadUrlDto
  - `content_type` 'image/jpeg' | 'image/png' | 'image/webp' | 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', required: MIME type of the calendar image or document to upload

## Response `200`

- GenerateFileImportUploadUrlResponseDto
  - `uploadUrl` string, required: Presigned URL the client should PUT the calendar file to
  - `fileKey` string, required: Transient R2 object key of the uploaded file (pass back to POST /day-plan/import/file)

---

[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)
