PUT
/
api
/
v1
/
profiles
/
{id}
/
avatar
cURL
curl --request PUT \
  --url https://api.scholarlysoftware.com/api/v1/profiles/{id}/avatar \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: image/jpeg' \
  --header 'X-Filename: profile-photo.jpg' \
  --data-binary '@/path/to/image.jpg'
{
  "message": "Avatar uploaded successfully",
  "avatar": {
    "attached": true,
    "filename": "avatar_1234567890.jpg",
    "content_type": "image/jpeg",
    "byte_size": 12345
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token

Content-Type
string

Content type of the image (e.g., image/jpeg, image/png). Defaults to image/jpeg

X-Filename
string

Optional filename for the uploaded image (e.g., profile-photo.jpg)

Content-Disposition
string

Alternative way to specify filename using Content-Disposition header (e.g., attachment; filename="photo.jpg")

Path Parameters

id
string
required

Profile UUID

Response

200
application/json

avatar uploaded successfully

The response is of type object.