---
title: "Start an image upload: returns a presigned PUT URL and the future image id"
method: POST
path: "/note/{note_id}/images/upload-url"
tags: ["note-images"]
---

# Start an image upload: returns a presigned PUT URL and the future image id

`POST /note/{note_id}/images/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/note/{note_id}/images/upload-url`
- Auth: HTTP bearer

## Path parameters

- `note_id` string, uuid, required

## Request body

- CreateNoteImageUploadDto
  - `content_type` 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp', required: MIME type the client will upload with
  - `file_size` number, required: File size in bytes

## Response `200`

- NoteImageUploadResponseDto
  - `image_id` string, required: Id the image will have once confirmed; use it in the complete call
  - `reference` string, required: Embed reference to write into the note body once the upload is confirmed
  - `upload_url` string, required: Presigned URL to PUT the raw file bytes to
  - `upload_headers` object, required: Headers the PUT must send exactly (the signature covers them)
  - `upload_url_expires_at` string, required: When upload_url stops working (ISO 8601)

## Other responses

- `400`: note_image_unsupported_type | note_image_too_large
- `409`: note_image_limit_reached

---

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