Delete Pet
The Delete Pet endpoint is used to remove an existing pet record from the Petstore system.
This operation deletes the pet associated with the specified pet ID. Once deleted, the resource may no longer be available for retrieval or update operations.
Endpoint
Base URL
https://petstore.swagger.io/v2/pet/{petId}
Path Parameters
| Parameter |
Type |
Required |
Description |
| petId |
integer |
Yes |
Unique identifier of the pet to be deleted |
| Header |
Required |
Description |
| api_key |
No |
API key used for authorized requests |
Sample Request
Successful Response
Response Codes
| Status Code |
Description |
| 200 |
Pet deleted successfully |
| 400 |
Invalid pet ID supplied |
| 404 |
Pet not found |
Error Response Example
{
"code": 404,
"type": "error",
"message": "Pet not found"
}
Notes
- The
petId parameter must reference an existing pet record.
- Deleting a non-existing pet may return a
404 response.
- Some environments may require API key authentication before performing delete operations.
- Deleted records may not be recoverable depending on the system implementation.