Change a member's settings or role in an agency
Changes a person's membership in the agency the request acts for (x-nicer-company): the settings noLeads, bookingAccessEnabled, hasAdvisorPortalAccess and isTestUser, and the role, between advisor and admin. It never changes the person's account, their contact details or their memberships in other agencies. Only the agency's admins and Nicer staff may call it, and staff must name the agency. The legacy company-level superadmin membership is Nicer staff's: only staff change its settings, and its role stays. The agency always keeps at least one admin; an admin may change themself under the same rule. A change of role publishes identity.company-member-role-changed.v1, a change of a setting identity.company-member-settings-changed.v1, and turning an advisor's portal access off app.CompanyMember.removed; the person's next token reflects the membership as it now stands. A request that changes nothing writes nothing. Answers the membership as it now stands. Errors: 400 ERROR_MALFORMED_BODY (not JSON), 400 ERROR_BODY_VALIDATION (an unknown field, a value of the wrong type, or nothing to change), 404 ERROR_ITEM_NOT_FOUND (the person is not an active member of this agency's staff), 403 ERROR_DO_NOT_HAVE_PERMISSION (the caller is neither an admin of the agency nor Nicer staff, or an agency admin changing the legacy superadmin membership), 409 ERROR_IDENTITY_INVALID_ROLE (a role change on the legacy superadmin membership), 409 ERROR_LAST_ADMIN (the agency would be left without an admin), 409 ERROR_CONDITIONAL_CHECK_FAILED (the membership kept changing while this change was made: read it again).
Authorization
Path parameters
Header parameters
Request body JSON required
Returns
200
OK
- updatedAtstringrequired
When the membership last changed.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$