WritedocsWritedocs

Create a pet

POST/pets

Body application/json

namestringrequired
tagstring

Response

Created

namestring
tagstring
idstring
Request
curl -X POST "https://petstore.swagger.io/v2/pets" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <X-API-Key>" \
  -d '{
  "name": "Rex",
  "tag": "dog"
}'
Response
{
  "name": "Rex",
  "tag": "dog",
  "id": "abc123"
}