activity

Generate a presigned upload URL for a user-scoped image

Not tied to an existing activity, so it can back habits that are not persisted yet (new habits, habits inside a pack). The image is stored under the caller’s own namespace.

post/activity/images/generate-upload-url

Request

  • Base URL
    https://api.focusbear.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

file_namestring required

Original file name of the image

content_type'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' required

MIME type of the image

Example request

{
  "content_type": "image/png"
}

Response

Presigned upload URL generated successfully

uploadUrlstring required

Presigned URL the client should PUT the image to

fileKeystring required

Storage key/path of the uploaded image

Changes

No recorded changes to this operation across all 1 revision of this API.