Users

Update your profile and account preferences

Changed on

Update the signed-in person's own profile, identified by id from fetchCurrentUser. Requires that person's permitted write access; another person's profile cannot be edited through this operation.

Send only the fields the person wants changed: name, about, handle, mobile, contact_info, account_mode, default_record_mode, or the place relationship. Profile and contact changes may affect what other people see. Confirm the requested changes before writing. Returns the updated user.

This does not change the login email, password, avatar, or SMS notification preferences, and changing a mobile here does not verify it. Password and phone verification flows stay on PurpleGrain's own pages; use updateUserAvatar for the profile picture and updateSmsPreferences for SMS notification preferences.

patch/users/{id}

Request

  • Base URL
    https://api.purplegrain.com/api/v1
  • URL
    https://api.purplegrain.com/api/v1/users/{id}
  • Auth
    HTTP bearer

Path parameters

idstring required

Id of the record

Query parameters

includestring
Example:services

Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; a path outside the allowed list is refused with 400 unknown_include (see the 400 response); dot notation selects children; max 10 paths. Allowed paths: city, city.location, place, place.location, location, services.

Request body

Response

Update. When the include query parameter is used, the response may contain an included array (JSON:API) or inlined related resources (application/json).

Example response

{
  "data": {
    "type": "user"
  }
}

Changes

    • info

      the request property // became nullable (media type: application/vnd.api+json)

    • info

      the request property / became nullable (media type: application/json)

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status