---
title: "Generate a presigned upload URL for an activity image"
method: POST
path: "/activity/{activityId}/images/generate-upload-url"
tags: ["activity"]
---

# Generate a presigned upload URL for an activity image

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

## Path parameters

- `activityId` string, required

## Request body

- GenerateActivityImageUploadUrlDto
  - `file_name` string, required: Original file name of the image
  - `content_type` 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp', required: MIME type of the image

## Response `201`

Presigned upload URL generated successfully

- GenerateActivityImageUploadUrlResponseDto
  - `uploadUrl` string, required: Presigned URL the client should PUT the image to
  - `fileKey` string, required: Storage key/path of the uploaded image

## Other responses

- `403`: User is not authorized to upload images for this activity
- `404`: Activity or user not found

---

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