Uploads
Avatar and company image uploads.
Upload avatar
Uploads or replaces the authenticated user avatar image.
POST
/api/uploads/avatarAuth: Bearer token or Clerk session.
Request body
Content-Type: multipart/form-data
image: <binary image>
# or use the field name "file"The route accepts multipart form data and looks for `image` first, then `file`.
Response body
{
"id": "00000000-0000-0000-0000-000000000000",
"url": "https://example.com/image.jpg"
}Status codes
- 201 Created
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error
Error format
{
"error": "Unauthorized",
"code": "unauthorized"
}Routes use the shared JSON error envelope; exact `code` values depend on the endpoint.