Skip to content
Get started

Deletes a pet.

client.Pets.Delete(ctx, petID) error
delete/pet/{petId}

Deletes a pet.

ParametersExpand Collapse
petID int64
formatint64
Deletes a pet.
package main

import (
  "context"

  "github.com/stainless-sdks/barkend-go"
  "github.com/stainless-sdks/barkend-go/option"
)

func main() {
  client := barkend.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Pets.Delete(context.TODO(), 0)
  if err != nil {
    panic(err.Error())
  }
}
{
  "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"
  }
}