Skip to main content
POST
/
api
/
user
/
uploadPicture
Upload profile picture
curl --request POST \
  --url https://pria.praxislxp.com/api/user/uploadPicture \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "imageData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
'
{
  "success": true,
  "url": "https://hiimpria.ai/uploads/6430d02554cd4e00403e8b05/profile_1738332000000_abc12345.png",
  "message": "Picture has been uploaded to your document collection successfully"
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Body

application/json
imageData
string
required

Base64 encoded image data with data URI prefix. Supported formats: png, jpeg, jpg, gif, webp. Maximum decoded size: 5MB.

Example:

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="

Response

Picture uploaded successfully. The file is saved to disk, a RAG upload record is created, and the user's profile picture URL is updated.

success
boolean
Example:

true

url
string

URL to access the uploaded picture

Example:

"https://hiimpria.ai/uploads/6430d02554cd4e00403e8b05/profile_1738332000000_abc12345.png"

message
string
Example:

"Picture has been uploaded to your document collection successfully"