Update user avatar
PUT
/users/me/avatar
const url = 'https://api.muninx.com/users/me/avatar';const form = new FormData();form.append('avatar', 'file');
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.muninx.com/users/me/avatar \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form avatar=@fileUploads the authenticated user’s global avatar as JPEG, PNG, or WebP. The image must be no larger than 5 MB and no dimension may exceed 4000 px. Variants are stored at avatars/global/<email>/versions/{size}.webp.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
avatar
required
JPEG, PNG, or WebP image file.
string format: binary
Responses
Section titled “ Responses ”OK
Media type application/json
Map of avatar size in pixels to the uploaded avatar URL or storage location.
object
key
additional properties
string
Example
{}RFC 9457 problem details
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
key
additional properties
any
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com"}RFC 9457 problem details
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
key
additional properties
any
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com"}RFC 9457 problem details
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
key
additional properties
any
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com"}RFC 9457 problem details
Media type application/problem+json
RFC 9457 problem details.
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
key
additional properties
any
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com"}