# Delete a webhook endpoint — Shorty API

> Deletes one of the authenticated account’s webhook endpoints and any deliveries still queued for it. A non-existent or foreign id returns 404.

```http
DELETE /v1/webhook-endpoints/{endpointId}
```

Deletes one of the authenticated account’s webhook endpoints and any deliveries still queued for it. A non-existent or foreign id returns 404.

## Authentication

Requires a Bearer credential — a `shk_live_` API key or an OAuth 2.1 access token with the scope for this resource. See [Authentication](/docs/api).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `endpointId` | path | Yes | — |

## Example request

curl:

```bash
curl -X DELETE https://aishorty.com/v1/webhook-endpoints/{endpointId} \
  -H "Authorization: Bearer shk_live_your_key"
```

TypeScript (@aishorty/sdk):

```typescript
import { Shorty } from '@aishorty/sdk'

const shorty = new Shorty({ apiKey: process.env.SHORTY_API_KEY })

const { data } = await shorty.request({
    method: 'DELETE',
    path: '/v1/webhook-endpoints/{endpointId}',
})
```

## Response · 200

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The deleted endpoint’s id. |
| `deleted` | `"true"` | Yes | — |

## Errors

On failure this endpoint returns an RFC 9457 problem body. Possible statuses:

- `400`
- `401`
- `403`
- `404`
- `429`
- `500`

Switch on the problem `code`, not the status. See the [error reference](/docs/api/errors) for every code and how to fix it.
