# prov.trace.canarySets.delete

prov.trace.canarySets.delete in Node SDK.

## Signature

```ts
prov.trace.canarySets.delete(setId: string): Promise<{ id: string; object: "canary_set"; deleted: true }>
```

## Parameters

- `setId` (string)

## Returns

`Promise<{ id: string; object: "canary_set"; deleted: true }>`

## HTTP operation

[`DELETE /v1/trace/canary_sets/{id}`](https://provenanceauth.com/docs/api/canary-sets.md#delete-v1-trace-canary-sets-id): Delete a canary set

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/canary_sets`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "family": "payroll_change",
    "model": "qwen2.5-0.5b-instruct@7ae55760",
    "members": [
      {
        "layer": 16,
        "idx": 1495,
        "pole": "pos",
        "threshold": 11
      }
    ],
    "card": {
      "title": "Payroll change",
      "definition": "Text that asks the agent to change where an employee is paid.",
      "may_indicate": [
        "An email asks HR to update direct deposit"
      ]
    }
  }),
})).json();
const setId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/canary_sets/${setId}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/trace/canary_sets", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "family": "payroll_change",
    "model": "qwen2.5-0.5b-instruct@7ae55760",
    "members": [
        {
            "layer": 16,
            "idx": 1495,
            "pole": "pos",
            "threshold": 11
        }
    ],
    "card": {
        "title": "Payroll change",
        "definition": "Text that asks the agent to change where an employee is paid.",
        "may_indicate": [
            "An email asks HR to update direct deposit"
        ]
    }
}).json()
set_id = step1["id"]
data = httpx.delete(f"{api}/v1/trace/canary_sets/{set_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```
