# deleteEvent (https://www.cal-sdk.com/docs/reference/delete-event)

For a recurring event, `scope` decides whether one occurrence, the rest of the series or the whole series goes. Pass `sendUpdates` to tell the guests, where the provider can.

```ts
import { deleteEvent } from '@cal-sdk/core';

await deleteEvent({ calendar, eventId });
```

## Options [#options]

<TypeTable
  type={{
    eventId: { type: 'string', required: true },
    calendarId: { type: 'string', default: "'primary'" },
    scope: { type: "'this' | 'all' | 'thisAndFollowing'", description: 'For occurrence and exception ids: delete only this instance, the whole series, or this and later instances.', default: "'this'" },
    ifMatch: { type: 'string', description: "Only delete if the event's `etag` still matches, otherwise throw `ConflictError`. On Outlook, calsdk checks it just before deleting, so a change in between isn't caught." },
    sendUpdates: { type: "'all' | 'externalOnly' | 'none'", description: 'Whether attendees are notified.' },
  }}
/>

Plus the [common options](/docs/reference#common-options).

## Result [#result]

`{ warnings }`, plus `providerMetadata` and `response` when the provider sets them.

## Throws [#throws]

- `NotFoundError` when the event does not exist. If a retry finds the event gone because an earlier attempt deleted it, the call succeeds instead.
- `ConflictError` when `ifMatch` no longer matches.
- `UnsupportedFunctionalityError` for a scope the provider cannot use, or on a read-only ICS feed.
