Navigation
Update a user
Update an existing user. Supply the user ID that was used to create the user.
Parameters
user string REQUIRED
The user ID that was used to create the user. This is the same as the user parameter in the attach a device method.
email string
The email address of the user.
phone string
The phone number of the user.
metadata object
The custom metadata to be appended to any pre-existing user metadata.
groups object / array of objects
The group or groups that the user belongs to. This can be a group object or an array of group objects.
Child parameters
group.id string REQUIRED
The id of the group in your system.
group.name string
The name of the group or organization.
group.metadata object
The custom metadata to be appended to any pre-existing group metadata.
Returns
Returns a success message.
POST /v2/user/:id/update
await Rupt.updateUser({
user: "USER_ID",
email: "test@test.com",
phone: "1234567890",
metadata: {
key: "value",
},
groups: [
{
id: "group_id",
name: "Group Name",
metadata: {
key: "value",
},
},
],
});
Response
{
"success": true
}