client.users.patch
A method of the Users endpoint.
- patch(id: int, *, name: str = None, email: str = None, active: bool = None, primary_group_id: int = None, city: str = None, state: str = None, time_zone: str = None, initials: str = None, department: str = None, title: str = None, prefers_sms_otp: bool = None, group_ids: List[int] = None, vpn_enabled: bool = None, sso_disabled: bool = None, otp_required_for_login: bool = None, exempt_from_org_sms_otp_disabled: bool = None, robot: bool = None, phone: str = None, password: str = None, account_status: str = None) Response
Update info about a user (must be a team or org admin)
API URL:
PATCH /users/{id}import civis client = civis.APIClient() response = client.users.patch(...)
- Parameters:
- idint
The ID of this user.
- namestr, optional
The name of this user.
- emailstr, optional
The email of this user.
- activebool, optional
Whether this user account is active or deactivated.
- primary_group_idint, optional
The ID of the primary group of this user.
- citystr, optional
The city of this user.
- statestr, optional
The state of this user.
- time_zonestr, optional
The time zone of this user.
- initialsstr, optional
The initials of this user.
- departmentstr, optional
The department of this user.
- titlestr, optional
The title of this user.
- prefers_sms_otpbool, optional
The preference for phone authorization of this user
- group_idsList[int], optional
An array of ids of all the groups this user is in.
- vpn_enabledbool, optional
The availability of vpn for this user.
- sso_disabledbool, optional
The availability of SSO for this user.
- otp_required_for_loginbool, optional
The two factor authentication requirement for this user.
- exempt_from_org_sms_otp_disabledbool, optional
Whether the user has SMS OTP enabled on an individual level. This field does not matter if the org does not have SMS OTP disabled.
- robotbool, optional
Whether the user is a robot.
- phonestr, optional
The phone number of this user.
- passwordstr, optional
The password of this user.
- account_statusstr, optional
Account status of this user. One of: “Active”, “Deactivated”, “Suspended”, “Unsuspended”
- Returns:
civis.Response- idint
The ID of this user.
- userstr
The username of this user.
- namestr
The name of this user.
- emailstr
The email of this user.
- activebool
Whether this user account is active or deactivated.
- primary_group_idint
The ID of the primary group of this user.
- groupsList[
civis.Response] An array of all the groups this user is in.
- idint
The ID of this group.
- namestr
The name of this group.
- slugstr
The slug of this group.
- organization_idint
The ID of the organization associated with this group.
- organization_namestr
The name of the organization associated with this group.
- groupsList[
- citystr
The city of this user.
- statestr
The state of this user.
- time_zonestr
The time zone of this user.
- initialsstr
The initials of this user.
- departmentstr
The department of this user.
- titlestr
The title of this user.
- github_usernamestr
The GitHub username of this user.
- prefers_sms_otpbool
The preference for phone authorization of this user
- vpn_enabledbool
The availability of vpn for this user.
- sso_disabledbool
The availability of SSO for this user.
- otp_required_for_loginbool
The two factor authentication requirement for this user.
- exempt_from_org_sms_otp_disabledbool
Whether the user has SMS OTP enabled on an individual level. This field does not matter if the org does not have SMS OTP disabled.
- sms_otp_allowedbool
Whether the user is allowed to receive two factor authentication codes via SMS.
- robotbool
Whether the user is a robot.
- phonestr
The phone number of this user.
- organization_slugstr
The slug of the organization the user belongs to.
- organization_sso_disable_capablebool
The user’s organization’s ability to disable sso for their users.
- organization_login_typestr
The user’s organization’s login type.
- organization_sms_otp_disabledbool
Whether the user’s organization has SMS OTP disabled.
- my_permission_levelstr
Your permission level on the object. One of “read”, “write”, or “manage”.
- created_atstr (date-time)
The date and time when the user was created.
- updated_atstr (date-time)
The date and time when the user was last updated.
- last_seen_atstr (date-time)
The date and time when the user last visited Platform.
- suspendedbool
Whether the user is suspended due to inactivity.
- created_by_idint
The ID of the user who created this user.
- last_updated_by_idint
The ID of the user who last updated this user.
- unconfirmed_emailstr
The new email address awaiting confirmation from the user.
- account_statusstr
Account status of this user. One of: “Active”, “Deactivated”, “Suspended”, “Unsuspended”