---
title: "Create user"
method: POST
path: "/user"
tags: ["user"]
---

# Create user

`POST /user`

This can only be done by the logged in user.

## Request body

- User
  - `id` integer
  - `username` string
  - `firstName` string
  - `lastName` string
  - `email` string
  - `password` string
  - `phone` string
  - `userStatus` integer — User Status

## Response `default`

successful operation

- User
  - `id` integer
  - `username` string
  - `firstName` string
  - `lastName` string
  - `email` string
  - `password` string
  - `phone` string
  - `userStatus` integer — User Status

## Changes

- **2025-03-13** `887ffd0911f2` — 3 breaking, 9 info
  - removed the required property `code` from the response with the `default` status
  - removed the required property `message` from the response with the `default` status
  - removed the success response with the status `200`
  - added the media type `application/xml` for the response with the status `default`
  - …8 more
- **2025-03-12** `253de9e0f0ae` — 1 breaking, 8 warning, 2 info
  - removed the media type `application/xml` for the response with the status `default`
  - removed the optional property `email` from the response with the `default` status
  - removed the optional property `firstName` from the response with the `default` status
  - removed the optional property `id` from the response with the `default` status
  - …7 more
- **2025-03-10** `7f5fd6699f68` — 1 info
  - added the success response with the status `200`

[Change history](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/changes/user/post.md)

---

[API](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0.md) · [All operations](https://skmtc.dev/swagger/apis/swagger-petstore-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/swagger/swagger-petstore-openapi-3-0/revisions/887ffd0911f2/schema)
