Upload a profile avatar
curl --request PUT \
--url https://api.scholarlysoftware.com/api/v1/profiles/{id}/avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '<string>'import requests
url = "https://api.scholarlysoftware.com/api/v1/profiles/{id}/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}/avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>",
"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 avatar
Upload an avatar image for a profile by sending the raw image binary data in the request body. This is the synced avatar, typically loaded from institutional data sources. When a profile also has a preferred avatar (uploaded by the user or via the preferred avatar endpoint), the preferred avatar takes precedence for display.
PUT
/
api
/
v1
/
profiles
/
{id}
/
avatar
Upload a profile avatar
curl --request PUT \
--url https://api.scholarlysoftware.com/api/v1/profiles/{id}/avatar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: image/jpeg' \
--data '<string>'import requests
url = "https://api.scholarlysoftware.com/api/v1/profiles/{id}/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}/avatar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>",
"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