Sofa
Account

Upload avatar

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

POST
/account/avatar
better-auth.session_token<token>

Better Auth session cookie

In: cookie

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "http://localhost:3000/api/v1/account/avatar" \  -F file="string"
{
  "imageUrl": "string"
}