# Delete a sync webhook

> Remove a webhook from a sync. Notifications of its type stop being posted to its URL.

Source: https://docs.stacksync.com/api-reference/syncs/webhooks/delete_sync_webhook

`DELETE https://api.stacksync.com/v1/workspaces/{workspace_id}/bases/{base_id}/webhooks/{webhook_id}`

- Operation: `delete_sync_webhook`
- Resource: Sync webhooks
- Access: writes data

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace the resources belong to |
| `base_id` | string (uuid) | Yes | The sync (a sync is called a base in these paths) |
| `webhook_id` | string | Yes | The webhook to delete |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) | Yes | Data region of the sync |

## Returns

### 200 The webhook deleted

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `msg` | string | Yes | `Successfully deleted webhook` |
| `webhook_id` | string (uuid) | Yes | The webhook |

## Example request

```bash
curl -X DELETE "https://api.stacksync.com/v1/workspaces/{workspace_id}/bases/{base_id}/webhooks/{webhook_id}?region=besg" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "msg": "Successfully deleted webhook",
  "webhook_id": "6a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | The `region` is missing or not one of besg, usnv; `base_id` is not a UUID; the webhook could not be deleted (`Error deleting webhook`) | `{ "error": string }` |
| 403 | Forbidden: invalid API key, API key of another workspace, insufficient scope, workspace unavailable, or a non-GET request without `Content-Type: application/json` | `{ "error": string }` |
| 404 | No sync with this id exists in the workspace, or no webhook of the sync has this id (`Sync or webhook does not exist.`) | `{ "error": string }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List sync webhooks](https://docs.stacksync.com/api-reference/syncs/webhooks/list_sync_webhooks)
- [Get a sync webhook](https://docs.stacksync.com/api-reference/syncs/webhooks/get_sync_webhook)
- [Create a sync webhook](https://docs.stacksync.com/api-reference/syncs/webhooks/create_sync_webhook)
- [Update a sync webhook](https://docs.stacksync.com/api-reference/syncs/webhooks/update_sync_webhook)