Get started
Swagger Petstore API
Explore the sample Petstore API and choose a pet, store, or user workflow.
Swagger Petstore is a sample HTTP API for working with pets, store orders, and users. Its OpenAPI 3.0.4 contract defines 19 operations and six reusable data models.
This documentation describes contract version
1.0.27. Swagger Petstore is a sample service, not a production service with published availability or data-retention commitments.Send your first request
Retrieve an order without changing server data.
Choose authentication
See which operations require OAuth 2.0 or an API key.
Work with pets
Find pets by status, tag, or identifier.
Browse the API
Review every published operation.
Capabilities
- Pets: create, update, find, delete, and attach an image to pet records.
- Store: read inventory counts and create, retrieve, or delete orders.
- Users: create users, manage a user record, and use the login and logout operations.
The API accepts and returns JSON for the examples in this documentation. Several operations also declare XML or form-encoded content in the source contract; see API conventions before choosing a content type.
Choose your next step
Start with the quickstart for a source-verified, read-only request. Then review authentication before calling pet or inventory operations.
Contract metadata
- Version:
1.0.27 - Format: OpenAPI
3.0.4 - License: Apache License 2.0
- Contract: Swagger Petstore OpenAPI document
- Source: Swagger Petstore repository
- Contact:
apiteam@swagger.io
The contract also links to the Swagger terms of service.