PetstoreAPI Docs
Modern Petstore APIClassic Petstore APIBlog
Modern Petstore APIClassic Petstore APIBlog
  1. User
  • Modern Pet Store API: A New Gold Standard for OpenAPI
  • Pet
    • Get Pet
      GET
    • Update Pet
      PUT
    • Delete Pet
      DELETE
    • Create Pet
      POST
    • List Pets
      GET
    • Upload Pet Image
      POST
  • Chat
    • Create Chat Completion
      POST
  • Payments
    • Pay Order
      POST
  • Store
    • List Inventory
      GET
    • Create Order
      POST
    • Get Order
      GET
    • Delete Order
      DELETE
    • Callback Example
      POST
  • User
    • Create User
      POST
    • Update User
      PUT
    • Get User
      GET
    • Delete User
      DELETE
    • Login
      POST
    • Logout
      POST
  • Webhooks
    • Pet Adopted Event
    • New Pet Available Event
  • Schemas
    • Pet
    • PetCollection
    • User
    • OrderPayment
    • Bank Card
    • Bank Account
    • Category
    • Links
    • Order
    • ApiResponse
    • Tag
    • Error
Modern Petstore APIClassic Petstore APIBlog
Modern Petstore APIClassic Petstore APIBlog
  1. User

Update User

PUT
/users/{id}
Update user information. Only the logged-in user can perform this operation.

Request

Authorization
OAuth 2.0
Authorization Code
deviceCode
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.petstoreapi.com/authorize
Token URL: https://auth.petstoreapi.com/token
Refresh URL: https://auth.petstoreapi.com/refresh
or
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
or
Path Params

Body Params application/json

Examples

Responses

🟢200
application/json
User updated successfully.
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT '/users/user_abc123xyz' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 51,
    "username": "Norma Ritchie",
    "firstName": "Jeffrey",
    "lastName": "Kris",
    "email": "Victoria.Kozey59@yahoo.com",
    "password": "xwrQ4gkAA1SQFmd",
    "phone": "(863) 406-3542",
    "userStatus": -1
}'
Response Response Example
{}
Modified at 2025-12-17 08:25:04
Previous
Create User
Next
Get User
Built with