Upload an avatar or background
POST
/image/upload
const url = 'https://api.harperharbor.com/open/v1/image/upload';const form = new FormData();form.append('file', 'file');form.append('roleId', 'example');
const options = {method: 'POST', 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 POST \ --url https://api.harperharbor.com/open/v1/image/upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form roleId=exampleAuthorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typemultipart/form-data
object
file
string format: binary
roleId
string
Responses
Section titled “Responses”Same size limit and quota as the site.