Skip to content
Get started

Update user

client.users.update(stringexistingUsername, UserUpdateParams { id, email, firstName, 5 more } body?, RequestOptionsoptions?): void
PUT/user/{username}

This can only be done by the logged in user.

ParametersExpand Collapse
existingUsername: string
body: UserUpdateParams { id, email, firstName, 5 more }
id?: number
formatint64
email?: string
firstName?: string
lastName?: string
password?: string
phone?: string
username?: string
userStatus?: number

User Status

formatint32

Update user

import RpTestDocs1 from 'rp-test-docs-1';

const client = new RpTestDocs1({
  apiKey: process.env['PETSTORE_API_KEY'], // This is the default and can be omitted
});

await client.users.update('username');
Returns Examples