Skip to content

Create user.

POST
/user
curl -X POST 'https://petstore3.swagger.io/api/v3/user' \
-H 'Content-Type: application/json' \
-d '{"email":"john@email.com","firstName":"John","id":10,"lastName":"James","password":"12345","phone":"12345","userStatus":1,"username":"theUser"}'

This can only be done by the logged in user.

Created user object

object
email
string
Example
john@email.com
firstName
string
Example
John
id
integer format: int64
Example
10
lastName
string
Example
James
password
string
Example
12345
phone
string
Example
12345
userStatus

User Status

integer format: int32
Example
1
username
string
Example
theUser

Successful operation

object
email
string
firstName
string
id
integer format: int64
lastName
string
password
string
phone
string
userStatus

User Status

integer format: int32
username
string
Example
{
"email": "john@email.com",
"firstName": "John",
"id": 10,
"lastName": "James",
"password": "12345",
"phone": "12345",
"userStatus": 1,
"username": "theUser"
}

Unexpected error

Suggest an edit to this page