Skip to main content
PUT
/
users
/
{id}
Update User
curl --request PUT \
  --url https://api.petstoreapi.com/v1/users/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "firstName": "Jeffrey",
  "lastName": "Kris",
  "email": "[email protected]",
  "phone": "+18634063542"
}
'
{}

Headers

X-Tenant-ID
string<uuid>

Optional tenant identifier for data isolation. When provided, all operations will be scoped to this tenant, ensuring data separation between different organizations or users. If omitted, operations will access the shared/public data pool where data may be visible to and modified by other users.

Path Parameters

id
string
required

Unique identifier for the user

Body

application/json

User account information

username
string
required

Unique username for login

Required string length: 3 - 50
Examples:

"johndoe"

"mysqluser"

email
string<email>
required

User email address

firstName
string
required

User's first name

Examples:

"John"

"Jane"

lastName
string
required

User's last name

Examples:

"Doe"

"Smith"

phone
string

Phone number in E.164 format

Example:

"+12025551234"

preferences
object

Response

User updated successfully.

The response is of type object.