# Delete a webhook

`DELETE https://api.fiscalisto.com/v1/webhook_endpoints/{id}`

It stops sending events to that address. The events remain in GET /v1/events.

## Before you call

- **A key for the whole account**: not limited to some issuers or to a test environment.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const deleted = await fiscalisto.webhookEndpoints.delete("prd_OufpKqnrvx9p1");
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

deleted = fiscalisto.webhook_endpoints.delete("prd_OufpKqnrvx9p1")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$deleted = $fiscalisto->webhookEndpoints->delete('prd_OufpKqnrvx9p1');
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var deleted = await fiscalisto.WebhookEndpoints.DeleteAsync("prd_OufpKqnrvx9p1");
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	deleted, err := client.WebhookEndpoints.Delete(ctx, "prd_OufpKqnrvx9p1")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(deleted.ID)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var deleted = fiscalisto.webhookEndpoints().delete("prd_OufpKqnrvx9p1");
System.out.println(deleted.getId());
```

## Response 200

OK.

A `Deleted` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `object` | string | yes | What kind of object it is («invoice», «customer»…). |
| `deleted` | `true` | yes | Always true. |

```json
{
  "id": "prd_OufpKqnrvx9p1",
  "object": "product",
  "deleted": true
}
```

## Errors

- `key_restricted` (403): This key is limited to some issuers and the request touches another one (or creates one, or uses something of the whole account, like webhooks).
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
