Navigation

Update a user

Update an existing user. Pass the user ID your application uses when it evaluates an action with the client SDK. Only the fields you send are changed; anything you leave out stays as it was.

Parameters


user string REQUIRED

The user ID your application uses to identify this user to Rupt.


email string

The email address of the user.


phone string

The phone number of the user.


metadata object

Custom metadata to store on the user.


groups object / array of objects

The group or groups the user belongs to. Pass a single group object or an array of them.

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

Custom metadata to store on the group.


Returns


Returns nothing on success (204 No Content).
POST/v3/user/:id/update
await rupt.updateUser({
  user: "USER_ID",
  email: "user@example.com",
  phone: "+15551234567",
  metadata: {
    key: "value",
  },
  groups: [
    {
      id: "group_id",
      name: "Group Name",
      metadata: {
        key: "value",
      },
    },
  ],
});