Skip to content

All resources

users

4 endpoints

get /users/avatars

List avatars for the active org

Requires authentication

Returns {userId, email, avatarUrl} for every member of the caller's active org who has an avatar. One request backs every avatar on screen, so a member list of N people does not cost N requests. Members without an avatar are omitted.

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

patch /users/me/avatar

Set or remove the caller's avatar

Requires authentication

Sets the authenticated user's own avatar. The body carries a small client-resized `data:image/...` URL (max 100 KB); an empty string removes the avatar. The target is always the caller — there is no user id in the path or body.

Request body: dto.UpdateAvatarRequest

NameTypeRequiredDescription
avatarUrlstringno

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

get /users/me/preferences

Get the caller's own preferences

Requires authentication

Returns the authenticated user's resolved preferences (FEAT-262). Every field carries a real value — a user who has never saved anything gets the defaults — so the client never duplicates them. There is no user id in the path: the target is always the caller.

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope

patch /users/me/preferences

Patch the caller's own preferences

Requires authentication

Merges the supplied fields into the authenticated user's preferences and returns the resolved result. Omitted fields are left alone. An unknown value is rejected with 400 naming the legal ones. The target is always the caller — there is no user id in the path or body.

Request body: dto.UpdatePreferencesRequest

NameTypeRequiredDescription
aiImproveStrengthstringnoAIImproveStrength is one of "slight", "balanced" or "strong" (domain.AIImproveStrength). Anything else is rejected with 400.
aiOutputLanguagestringnoAIOutputLanguage is "author" (write back in the author's own language) or "english" (domain.AIOutputLanguage). Anything else is rejected with 400.
pushobjectnoPush is the mobile push policy. nil means "this request did not mention push", which is not the same as "push, with everything cleared" — see PushPreferencesPatchRequest.

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope