> For the complete documentation index, see [llms.txt](/llms.txt).

- Snap

# snap_cancelBackgroundEvent

Cancel a background event created by [snap_scheduleBackgroundEvent](https://metamask-docs-git-imp-agt-scr-90-100-consensys-ddffed67.vercel.app/snaps/reference/snaps-api/snap%5Fschedulebackgroundevent).

## Parameters[​](#parameters "Direct link to Parameters")

object

required

An object containing the parameters for the `snap_cancelBackgroundEvent`method.

### id

string

required

The ID of the background event to cancel.

## Returns[​](#returns "Direct link to Returns")

null

This method does not return any data, so the result is always `null`.

## Example

```
const id = await snap.request({
  method: 'snap_scheduleBackgroundEvent',
  params: {
    // ...
  },
})

// Later, when you want to cancel the background event:
snap.request({
  method: 'snap_cancelBackgroundEvent',
  params: { id },
})

```
