Create user
POSThttps://petstore.swagger.io/v2/user
This can only be done by the logged in user.
Request
- application/json
Body
required
Created user object
pet object
username stringrequired
Possible values: >= 4 characters
User supplied username
firstName stringrequired
Possible values: non-empty
User first name
lastName stringrequired
Possible values: non-empty
User last name
email emailrequired
User email address
password passwordrequired
Possible values: >= 8 characters
, Value must match regular expression /(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/
User password, MUST contain a mix of upper and lower case letters, as well as digits
phone stringrequired
Possible values: Value must match regular expression /^\+(?:[0-9]-?){6,14}[0-9]$/
User phone number in international format
userStatus int32required
User status
Responses
- default
successful operation
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://petstore.swagger.io/v2/user' \
-H 'Content-Type: application/json' \
--data-raw '{
"pet": {
"category": {
"name": "string",
"sub": {
"prop1": "string"
}
},
"name": "Guru",
"photoUrls": [
"string"
],
"friend": {},
"tags": [
{
"name": "string"
}
],
"status": "available",
"petType": {
"huntingSkill": "adventurous"
}
},
"username": "John78",
"firstName": "John",
"lastName": "Smith",
"email": "john.smith@example.com",
"password": "drowssaP123",
"phone": "+1-202-555-0192",
"userStatus": 0
}'
ResponseClear