Profile
Read and update the signed-in user.
User routes sit under /api/user. They need a bearer token. They do not need X-Workspace-Id unless noted.
Get your profile
GET /api/user/profile
curl https://api.dunsocial.com/api/user/profile \
-H "Authorization: Bearer YOUR_TOKEN"Returns the current user record (id, name, email, image, and related fields).
Update your profile
PATCH /api/user/profile
Body: { "name"?: string, "image"?: string }
Profile image upload
POST /api/user/profile/image/upload-urlwith{ filename, contentType, size }PUTthe file bytes to the returneduploadUrlPATCH /api/user/profilewith the storage key or image URL as needed
Limits: jpeg, png, gif, or webp · max 5MB.
Remove the image with DELETE /api/user/profile/image.
| Method | Path | Notes |
|---|---|---|
GET |
/api/user/email-availability?email= |
{ available } |
PATCH |
/api/user/email |
{ email, otp } — requires verified change-email OTP; 400 if taken/invalid |
Default workspace
| Method | Path | Body / query |
|---|---|---|
GET |
/api/user/default-workspace |
— |
PATCH |
/api/user/default-workspace |
{ workspaceId: string | null } |
You must be a member of the workspace you set. Otherwise 403.
Email preferences
GET / PATCH /api/user/email-preferences — activation and marketing email toggles.