# Users Contains operations on the User resource. **Important**: The Attributes object contains the custom-defined attributes for a user. ## Inserts or updates a foreign key - [PUT /v3/users/{userId}/foreign-key/update/{key}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/upsertforeignkey.md): Inserts or updates the provided foreign key, if the supplied userId and key match. ## List users - [GET /v3/users](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listusers.md): Retrieves a list of users wrapped in the element "results". ## Create a user - [POST /v3/users](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/createuser.md): Creates a new user. ## Retrieve a user - [GET /v3/users/{user_id}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/getuser.md): Retrieves a user. ## Delete a user - [DELETE /v3/users/{user_id}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/deleteuser.md): Deletes a user. ## Update all user attributes - [PUT /v3/users/{user_id}/attributes](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/replaceuserattributes.md): Replaces a user's attributes. This will replace any existing attributes for the user with the attributes in the payload. To leave existing attributes in place, use PATCH. ## Update user attributes - [PATCH /v3/users/{user_id}/attributes](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/updateuserattribute.md): Updates a user's attributes. Any of the user's existing attributes not specified in the payload will be left in-place. ## Retrieve Extended User Profiles - [GET /v3/users/{user_id}/profile/{app_id}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/paths/~1v3~1users~1%7Buser_id%7D~1profile~1%7Bapp_id%7D/get.md): Extended Profile is used to store additional user information that is not part of the core profile. This endpoint is designed to be used for retrieving the user's Extended Profile. The body can be any valid JSON. ## Update users in bulk - [POST /v4/user-updates](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/updatebulkusers.md): Updates user's attributfoes or delete users on a bulk basis. When setting attributes, any of the user's existing attributes not specified in the payload will be left in-place. ## List all bulk user update jobs - [GET /v4/user-updates](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listbulkuserupdatejobs.md): Lists all bulk user update jobs. ## Retrieves a bulk user update job - [GET /v4/user-updates/{job_id}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/retrievebulkuserupdatejob.md): Retrieves the status of a bulk user update job. ## Create a user segment - [POST /v4/users/segments](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/createusersegment.md): Creates a new User Segment. ## List user segments - [GET /v4/users/segments](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listusersegment.md): Lists all user segments available for users. ## Retrieve a user segment - [GET /v4/users/segments/{segmentId}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/getusersegment.md): Retrieves a user segment. ## Delete a user segment - [DELETE /v4/users/segments/{segmentId}](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/deleteusersegment.md): Deletes a user segment by ID. ## List user segments for a user - [GET /v4/users/{userId}/segments](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listusersegmentsforuser.md): Lists all user segments for a given userId. ## Start an email address update - [POST /v3/users/{user_id}/update-email](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/startemailaddressupdate.md): Starts an email address update. If the Require Email Verification configuration flag is set, to update a user's email address, first they need to verify their new address. If the Email Change Override feature flag is enabled, the an email with a link to verify the address will be sent to the new address. Otherwise the email will be sent to the old address. If the Require Email Verification configuration flag is not set, this endpoint sets the new email address immediately. If the user has a username and the provided email address is blank, the email address is deleted. If the user does not have a username and the provided email address is blank, a 400 is returned. ## Start a password reset - [POST /v4/users/reset](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/startpasswordreset.md): Starts a password reset. IMPORTANT: To reset a user password, first is required to send a POST to request an email to be sent to the user’s email with a link for the user to click on, so as to verify that they requested this password change. ## Start a passwordless authentication - [POST /v3/users/token-exchange](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/startpasswordlessauthentication.md): Starts a passwordless authentication. IMPORTANT: For passwordless authentication, first is required to send a POST to request an email to be sent to the user’s email with a link for the user to click on to verify his email. ## List user sessions - [GET /v3/users/{user_id}/sessions](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listusersessions.md): Retrieves a list of the user's sessions. ## List user accounts - [GET /v3/users/{user_id}/accounts](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/listuseraccounts.md): Retrieves a list of the user's accounts. ## Refresh a access model - [POST /v3/users/{user_id}/authorization/refresh](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/refreshaccessmodel.md): Refreshes the user's access model. ## Reset a legacy password - [POST /v3/users/{user_Id}/legacyPassword](https://developer.zuora.com/zephr-api-reference/zephr-admin-api/users/resetlegacypassword.md): Sets the current password to an empty string, also sets the legacy password to the provided string.