Update avatar
Upload a user avatar image for an account.
The image will be normalized to 512x512 PNG format and stored separately from automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
This endpoint only accepts accountID values for the uniqueID parameter.
To access this endpoint using an access token
you'll need to specify the /accounts.write scope.
PUT
/avatars/{uniqueID}
curl -X PUT "https://api.moov.io/avatars/{uniqueID}" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.07.00" \
-F "file=@/path/to/file"mc, _ := moov.NewClient()
var accountID string
image, _ := os.Open("/path/to/image.png")
mc.UploadAvatar(ctx, accountID, image)
import { Moov } from "@moovio/sdk";
import { openAsBlob } from "node:fs";
const moov = new Moov();
async function run() {
const result = await moov.avatars.upload({
username: "",
}, {
uniqueID: "<id>",
avatarUploadRequest: {
file: await openAsBlob("example.file"),
},
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
use Moov\MoovPhp\Models\Operations;
$sdk = MoovPhp\Moov::builder()->build();
$avatarUploadRequest = new Components\AvatarUploadRequest(
file: new Components\AvatarUploadRequestFile(
fileName: 'example.file',
content: file_get_contents('example.file');,
),
);
$requestSecurity = new Operations\UploadAvatarSecurity(
username: '',
);
$response = $sdk->avatars->upload(
security: $requestSecurity,
uniqueID: '<id>',
avatarUploadRequest: $avatarUploadRequest
);
if ($response->statusCode === 200) {
// handle response
}package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.AvatarUploadRequest;
import io.moov.sdk.models.components.AvatarUploadRequestFile;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.operations.UploadAvatarResponse;
import io.moov.sdk.models.operations.UploadAvatarSecurity;
import io.moov.sdk.utils.Utils;
import java.io.FileInputStream;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GenericError, Exception {
Moov sdk = Moov.builder()
.build();
UploadAvatarResponse res = sdk.avatars().upload()
.security(UploadAvatarSecurity.builder()
.username("")
.build())
.uniqueID("<id>")
.avatarUploadRequest(AvatarUploadRequest.builder()
.file(AvatarUploadRequestFile.builder()
.fileName("example.file")
.content(Utils.readBytesAndClose(new FileInputStream("example.file")))
.build())
.build())
.call();
}
}from moovio_sdk import Moov
from moovio_sdk.models import operations
with Moov() as moov:
res = moov.avatars.upload(security=operations.UploadAvatarSecurity(
username="",
), unique_id="<id>", file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
# Handle response
print(res)require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new
res = s.avatars.upload(security: Models::Operations::UploadAvatarSecurity.new(
basic_auth: Models::Components::SchemeBasicAuth.new(
username: '',
password: ''
)
), unique_id: '<id>', avatar_upload_request: Models::Components::AvatarUploadRequest.new(
file: Models::Components::AvatarUploadRequestFile.new(
file_name: 'example.file',
content: File.binread('example.file')
)
))
if res.status_code == 200
# handle response
endusing Moov.Sdk;
using Moov.Sdk.Models.Components;
using Moov.Sdk.Models.Requests;
var sdk = new MoovClient();
var res = await sdk.Avatars.UploadAsync(
security: new UploadAvatarSecurity() {
BasicAuth = new SchemeBasicAuth() {
Username = "",
Password = "",
},
},
uniqueID: "<id>",
body: new AvatarUploadRequest() {
File = new AvatarUploadRequestFile() {
FileName = "example.file",
Content = System.IO.File.ReadAllBytes("example.file"),
},
}
);
// handle responseThe request completed successfully, but there is no content to return.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request payload is larger than the server is willing or able to process.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The media type of the request payload is not supported.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
X-Moov-Version
string
Set this header to v2026.07.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, which may not match the behavior documented here.
Possible values:
v2026.07.00
Path parameters
uniqueID
string
required
The accountID to upload the avatar for. Only accountID values are accepted for writes.
Body
multipart/form-data
file
string<binary>
required
A JPEG, PNG, or WebP image file to upload as an avatar.