Upload a profile preferred avatar
curl --request PUT \
--url https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '<string>'import requests
url = "https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "image/jpeg"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/jpeg'},
body: '<string>'
};
fetch('https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>",
"preferred_avatar": {
"attached": true,
"filename": "avatar.jpg",
"content_type": "image/jpeg",
"byte_size": 45000
}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "422",
"title": "Validation Error",
"detail": "Label can't be blank"
}
]
}Profiles
Upload a profile preferred avatar
Upload a preferred avatar image for a profile by sending the raw image binary data in the request body. The preferred avatar is the user-managed photo — the same field written when a user uploads a photo in the web UI — and takes precedence over the synced avatar for display.
PUT
/
api
/
v1
/
profiles
/
{id}
/
preferred_avatar
Upload a profile preferred avatar
curl --request PUT \
--url https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '<string>'import requests
url = "https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "image/jpeg"
}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/jpeg'},
body: '<string>'
};
fetch('https://api.scholarlysoftware.com/api/v1/profiles/{id}/preferred_avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>",
"preferred_avatar": {
"attached": true,
"filename": "avatar.jpg",
"content_type": "image/jpeg",
"byte_size": 45000
}
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "<string>",
"title": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"status": "422",
"title": "Validation Error",
"detail": "Label can't be blank"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Bearer token
Path Parameters
Body
image/jpegimage/pngimage/gifimage/webp
The body is of type file.
⌘I