Update User
Update User Details
This endpoint allows administrators to update the details of a user in the system. It is a PUT request that modifies the user's information based on the provided payload.
Request Parameters
The request body should be a JSON object with the following parameters:
-
_id (string): The unique identifier of the user to be updated.
-
email (string): The email address of the user. This field can be left empty if no change is required.
-
firstName (string): The first name of the user.
-
lastName (string): The last name of the user.
-
isActive (boolean): Indicates whether the user account is active.
-
isVerified (boolean): Indicates whether the user's email has been verified.
-
permission (object): An object that defines the permissions for the user with the following keys:
-
audio (boolean): Permission to access audio features.
-
video (boolean): Permission to access video features.
-
text (boolean): Permission to access text features.
-
addPayment (boolean): Permission to add payment methods.
-
userManagement (boolean): Permission to manage other users.
Expected Response
Upon a successful update, the API will return a response indicating the status of the operation. The response typically includes a success message and may also return the updated user details.
Notes
-
Ensure that the user ID provided in the request is valid and corresponds to an existing user in the system.
-
The permissions object allows for fine-grained control over what the user can access, so be sure to set these values according to your application's requirements.
-
If any required fields are missing or invalid, the API will return an error response with details about the issue.
Request
- Base URL: https://api.speakai.co/v1
- URL: https://api.speakai.co/v1/admin/user
- Auth: API key in header x-speakai-key and API key in header x-access-token
Request body
Response
Success
Changes
No recorded changes to this operation across all 2 revisions of this API.