# ลบ endpoint

Source: https://checkslip.com/docs/delete-endpoint

DELETE `https://api.checkslip.com/api/webhooks/endpoints/{endpoint_id}`

ใช้ API key

หยุดส่งไปที่ endpoint นี้ทันที รายการส่งที่ยังรอส่งถูกยกเลิก (CANCELLED) · ลบแล้วกู้คืนไม่ได้ และส่งซ้ำรายการส่งของ endpoint นี้ไม่ได้อีก แต่ยังดูประวัติการส่งได้จนแต่ละรายการครบ 30 วันนับจากเวลาที่ส่ง · ถ้าแค่อยากหยุดส่ง ให้แก้ enabled เป็น false แทน (ระหว่างปิด ข้อความใหม่ไม่ถูกเก็บไว้) · ใช้ API key ที่มีสิทธิ์ webhook:manage

## Parameters

| ฟิลด์ | ส่งทาง | ชนิด | จำเป็น |
| --- | --- | --- | --- |
| `endpoint_id` | path | `string` | ใช่ |
| `traceparent` | header | `string` | ไม่ |

## Responses

### 204

ไม่มี body

### Error ที่อาจได้

401 403 404

error ในรูป Problem Details ดูรหัสทั้งหมดที่ [รหัสข้อผิดพลาด](https://checkslip.com/docs/errors)

**cURL**

```bash
curl -X DELETE https://api.checkslip.com/api/webhooks/endpoints/string \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY"
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/webhooks/endpoints/string", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
  },
});
```

**Python**

```python
import os

import requests

res = requests.delete(
    "https://api.checkslip.com/api/webhooks/endpoints/string",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
    },
)
res.raise_for_status()
```
