Create User

Create User

This can only be done by the logged in user.

Request
URI
POST
https://petstore3.swagger.io/user
COPY
Request Body

Created user object

User of type(s) application/json
Optional
{
    "id": 10,
    "username": "theUser",
    "firstName": "John",
    "lastName": "James",
    "email": "[email protected]",
    "password": "12345",
    "phone": "12345",
    "userStatus": 1
}
integer As int64 As int64
id
Optional

id

string
username
Optional

username

string
firstName
Optional

firstName

string
lastName
Optional

lastName

string
email
Optional

email

string
password
Optional

password

string
phone
Optional

phone

integer As int32 As int32
userStatus
Optional

User Status

Authentication
This operation uses the following authentication methods.
Responses
200

successful operation

Returns User of type(s) application/json
"User Object"
integer As int64 As int64
id
Optional

id

string
username
Optional

username

string
firstName
Optional

firstName

string
lastName
Optional

lastName

string
email
Optional

email

string
password
Optional

password

string
phone
Optional

phone

integer As int32 As int32
userStatus
Optional

User Status


default

Unexpected error

Returns Error of type(s) application/json
"Error Object"
string
code
Required

code

string
message
Required

message


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/user