> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opigno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Subscription

## Mutations

### deleteWebhookSubscription

Removes an existing `WebhookSubscription` by its identifier.
After deletion, the system no longer sends event to the associated endpoint for that subscription.

<Info>
  * The API user context must have `AUTHENTICATED` scope to access webhook subscriptions. Anonymous users cannot retrieve this data.
  * The API user context must have permission to delete webhook subscriptions.
  * The API user context must be present and valid - otherwise, access is denied.
</Info>

The following arguments can be used in the mutation:

| Argument | Type  | Description                                   |
| :------- | :---- | :-------------------------------------------- |
| `id`     | `ID!` | The ID of the webhook subscription to delete. |

<CodeGroup>
  ```graphql GraphQL Query theme={null}
  mutation deleteWebhookSubscription {
    deleteWebhookSubscription(id: 98) {
      response
      errors
    }
  }
  ```

  ```json Response theme={null}
  {
    "deleteWebhookSubscription": {
      "response": true,
      "errors": []
    }
  }
  ```
</CodeGroup>

## Related Features

The `deleteWebhookSubscription` mutation supports the same advanced features as other mutations:

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/OpignoEnterpriseAPI/ConsumerUserAuthentication">
    Understand the authentication requirements and how to properly authenticate your requests.
  </Card>
</CardGroup>

Common error scenarios and solutions:

<AccordionGroup>
  <Accordion title="Authentication Errors">
    * **401 Unauthorized**: Ensure you're using a valid authentication token with `AUTHENTICATED` scope
    * **403 Forbidden**: Verify your user account has the necessary permissions to access webhook subscription data
  </Accordion>
</AccordionGroup>
