Back to API Overview

Your profile API

Your own profile: name and photo.

2 endpoints

Endpoints

POST
/api/v1/user/updateProfile

Change 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

namestring
timezonestring
regionstring
officeHoursStartstring
officeHoursEndstring
workingDaysarray
weekStartDaystring
timeFormatstring

Allowed values: 12h, 24h

dateFormatstring

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"
}'
POST
/api/v1/user/removePhoto

Remove 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 '{}'