AI Assistant

How can I help you today?

PetsCreate Pets
Pets

POST /pets

Add a new pet to the store

curl -X POST "https://api.petstore.example.com/v1/pets" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Buddy",
  "categoryId": 1,
  "photoUrls": [
    "example_string"
  ],
  "status": "available",
  "age": 25,
  "breed": "example_string",
  "description": "example_string"
}'
{
  "id": 123,
  "name": "Buddy",
  "category": {
    "id": 1,
    "name": "Dogs",
    "description": "All types of dogs"
  },
  "photoUrls": [
    "https://images.petstore.example.com/pets/123/main.jpg",
    "https://images.petstore.example.com/pets/123/side.jpg"
  ],
  "tags": [
    {
      "id": 1,
      "name": "friendly"
    }
  ],
  "status": "available",
  "age": 3,
  "breed": "Golden Retriever",
  "description": "Friendly and energetic dog, great with kids",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:45:00Z"
}
POST
/pets
POST
Security Scheme
Bearer Tokenstring
Required

JWT token obtained from the login endpoint

JWT token obtained from the login endpoint
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token obtained from the login endpoint

Responses