メインコンテンツまでスキップ

ユーザーを作成する

新しいユーザーアカウントを作成します。

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

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": "文字列",
"firstName": "文字列",
"lastName": "文字列",
"email": "文字列",
"password": "文字列",
"phone": "文字列",
"userStatus": 0
}'

レスポンス

コード説明
200操作成功
default操作成功
レスポンス例

200: 操作成功

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

パラメータ

リクエスト本文
名前タイプ説明
bodyUser オブジェクト必須。 作成する User オブジェクト。