POST
Create a signed upload URL

Authorizations

better-auth.session_token
string
cookie
required

Better Auth session cookie.

Body

application/json
contentType
string
required

MIME type of the object to upload

Minimum string length: 1
Example:

"image/png"

purpose
enum<string>

Logical upload purpose (affects object key prefix)

Available options:
avatar,
logo,
asset,
upload,
thumbnail

Response

Signed upload URL issued

uploadUrl
string<uri>
required

Signed PUT URL (expires in ~10 minutes)

key
string
required

Object key to store / reference after upload

Minimum string length: 1
publicUrl
string<uri>
required

Public GET URL after a successful PUT