User Management
Upload User Photo
Endpoint to upload a photo for a user.
Accepts a single image file upload, validates the content-type, saves the
file under the backend static/profile_images directory and updates the
user's profile_image to the proxied URL (/api/static/profile_images/<file>).
If user_id is provided, uploads for that user (requires MANAGE_USERS permission
unless uploading for self). If omitted, uploads for the authenticated user.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
user_id?integer|null
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/users/photo" \ -F file="string"null{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}