Your profile API
Your own profile: name and photo.
Endpoints
/api/v1/user/updateProfileChange the signed-in person's OWN profile (never anyone else's). Every param is optional; send only what the person asked to change: name (1 to 100 characters; spaces at the ends and invisible characters are removed), timezone (a time zone name from the list, e.g. "Europe/London" or "Asia/Kathmandu"), region ("Americas", "Europe", "Asia", "Africa", "Oceania" or "Antarctica"), officeHoursStart and officeHoursEnd ("HH:MM", 24-hour), workingDays (day names, each once: "Monday" to "Sunday", e.g. ["Monday","Tuesday"]), weekStartDay (e.g. "Monday"), timeFormat ("12h" or "24h"), dateFormat ("MM/DD/YYYY", "DD/MM/YYYY", "YYYY-MM-DD" or "DD.MM.YYYY"); region, weekStartDay and dateFormat at most 100 characters. Their email, password and photo are never changed here (anything else is refused). Call it only when the person asks, and tell them what changed. Refused while they work in someone else's workspace: they switch back to their own first. Returns { ok } plus the saved value of each field that changed (e.g. { ok, name, timezone }).
Parameters
name | string | |
timezone | string | |
region | string | |
officeHoursStart | string | |
officeHoursEnd | string | |
workingDays | array | |
weekStartDay | string | |
timeFormat | string | Allowed values: |
dateFormat | string |
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/user/updateProfile \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "example",
"timezone": "example",
"region": "example"
}'/api/v1/user/removePhotoRemove the signed-in person's OWN profile photo (never anyone else's); their initials show instead. A photo they uploaded is deleted; a photo that came from their Google sign-in is only unset. Takes no params. Call it only when the person asks. A new photo is not set from here: they pick one on their profile page. Refused while they work in someone else's workspace. Returns { image: null }. Act only on what the person named or picked.
Example Request
curl -X POST https://app.serenitiesai.com/api/v1/user/removePhoto \
-H "Authorization: Bearer mk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{}'