Skip to main content

Create a user

Create a new user account.

POST https://petstore3.swagger.io/api/v3/user

Examples

cURL
POST "https://petstore3.swagger.io/api/v3/user" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d '{
"id": 0,
"username": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
"userStatus": 0
}'

Responses

CodeDescription
200Successful operation
defaultSuccessful operation
Response example

200: Successful operation

Response
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}

Parameters

Request body
NameTypeDescription
bodyUser objectRequired. The User object to create.