Sample - Swagger Petstore OpenAPI 3
DELETE/pet/{petId}

Delete a pet

Deletes a specific pet from the store. Supply petId to identify the pet, and optionally provide api_key in the request header when your store configuration requires it. A successful response confirms that the pet was deleted.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
petIdintegerrequired
The integer identifier of the pet to delete.
api_keystringoptional
The API key used to authorize the deletion when store configuration requires a key.

3 status codes
200Confirms that the specified pet was deleted from the store.
400Returned when the supplied pet value is invalid.
defaultReturned when an unexpected error occurs.

Error handling

A 400 is returned when petId is not a valid pet identifier. Provide api_key when required by the store configuration.