Skip to main content
Upload a profile photo during the registration flow, before the user’s account has been fully created. The file is stored and a public CDN URL is returned immediately. Pass this URL in your registration payload so it is saved to the user record on account creation. POST /v1/auth/avatar No authentication required.

Request

The request must be sent as multipart/form-data.
avatar
file
required
The image file to upload. Common formats are accepted (JPEG, PNG, WebP). The original file extension is preserved in the stored filename.

Example

curl --request POST \
  --url "https://api.nyotaimara.com/v1/auth/avatar" \
  --form "avatar=@/path/to/photo.jpg"

Response

success
boolean
required
true when the upload completed successfully.
avatarUrl
string
required
A public CDN URL pointing to the uploaded image. Store this value and include it in your subsequent registration request.
{
  "success": true,
  "avatarUrl": "https://cdn.nyotaimara.com/avatars/user-1714000000000-abc123.jpg"
}
Error cases
StatusErrorDescription
400No avatar file providedThe avatar field is missing from the form data.
500Failed to upload avatarAn unexpected error occurred during upload.