Sofa
Account

Upload avatar

POST
/account/avatar

Upload a new profile avatar image. Accepts JPEG, PNG, WebP, or GIF up to 2 MB.

Authorization

session
cookiebetter-auth.session_token<token>

Better Auth session cookie

Request Body

multipart/form-data
  1. body
file*file
Formatbinary

Response Body

URL of the uploaded avatar image

application/json
  1. response
imageUrl*string

URL of the uploaded avatar image

curl -X POST "https://example.com/account/avatar" \  -F file="string"
{  "imageUrl": "string"}