Upload user file
POST
/api/v1/user/{id}/file
const url = 'https://example.com/api/v1/user/example/file';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST'};
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 POST \ --url https://example.com/api/v1/user/example/file \ --header 'Content-Type: multipart/form-data' \ --form file=@fileUploads a file (avatar) for a user
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
file
string format: binary
Responses
Section titled “ Responses ”File uploaded, user updated
Media type application/json
object
id
required
User ID (15 chars)
string
username
required
Username (3+ chars, alphanumeric with dots)
string
email
required
User email address
string format: email
avatar
Avatar file path
string
verified
Email verification status
boolean
created
string format: date-time
updated
string format: date-time
Example generated
{ "id": "example", "username": "example", "email": "hello@example.com", "avatar": "example", "verified": true, "created": "2026-04-15T12:00:00Z", "updated": "2026-04-15T12:00:00Z"}Bad Request
Not Found
Internal Server Error