Skip to content
Get started

Deletes a pet.

client.pets.delete(numberpetID, RequestOptionsoptions?): void
delete/pet/{petId}

Deletes a pet.

ParametersExpand Collapse
petID: number
formatint64
Deletes a pet.
import Barkend from 'barkend';

const client = new Barkend({
  apiKey: process.env['BARKEND_API_KEY'], // This is the default and can be omitted
});

await client.pets.delete(0);
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid pet value"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}
Returns Examples
{
  "error": {
    "id": "invalid_id",
    "message": "Invalid pet value"
  }
}
{
  "error": {
    "id": "not_found",
    "message": "Pet not found"
  }
}