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

# Delete event subscription

> Deletes an event subscription. Repeating the request can answer 404. The response has no fields. Every account can use event subscriptions. In an account whose Macs your organization manages, they need the events capability.

Service accounts can call it with the `compute:DeleteEventSubscription` permission.



## OpenAPI

````yaml /api-reference/openapi/compute.json delete /compute/v2/eventsubscriptions/{name}
openapi: 3.0.3
info:
  title: Mount Thor Compute API
  version: 02a4a30e3ecb
  description: >-
    Create, list, inspect and delete virtual machines and bare-metal Macs, read
    the image and machine-class catalogs, see your reserved capacity and your
    account's compute profile, report machine problems to Mount Thor, and
    subscribe to machine events. Service-account credentials can list, create
    and delete machines, read the catalogs and the compute profile, and use
    event subscriptions. In an account whose Macs your organization manages,
    they can also read a Mac and use problem reports, and every one of these
    only as far as the account's capabilities allow. The other compute
    operations are for people using the `mthr` CLI or the portal. In an account
    whose Macs your organization manages, an operation outside its capabilities
    (see Get compute profile) answers 400 `tenant_compute_customer_managed`.
    Mount Thor names each machine. To change a machine's class or image, delete
    it and create a new one. Lists return one page at a time: pass
    `nextPageToken` back as `pageToken` until it comes back empty.
servers:
  - url: https://customer-api.mountthor.com
security:
  - bearerAuth: []
paths:
  /compute/v2/eventsubscriptions/{name}:
    delete:
      summary: Delete event subscription
      description: >-
        Deletes an event subscription. Repeating the request can answer 404. The
        response has no fields. Every account can use event subscriptions. In an
        account whose Macs your organization manages, they need the events
        capability.


        Service accounts can call it with the `compute:DeleteEventSubscription`
        permission.
      operationId: ComputeService_DeleteEventSubscription
      parameters:
        - name: name
          in: path
          description: The subscription's `name`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteEventSubscriptionResponse'
        '400':
          description: >-
            The request is invalid or cannot be carried out now. `error.reason`
            says why when it can.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The credential is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The credential does not allow this operation. `error.reason` is
            `machine_credential_not_supported` when the operation refuses
            service accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No event subscription with this name exists in your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests for now. Event subscription operations are limited
            per account; retry after the number of seconds in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            With `error.reason` `unknown` (`error.status` `Unknown`), the delete
            may have been applied. Get the subscription before retrying: a 404
            means it was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: >-
            Event subscriptions are not available yet (`unimplemented`); retry
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Compute is temporarily unable to complete the request; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DeleteEventSubscriptionResponse:
      type: object
      properties: {}
      description: Empty. The subscription was deleted.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: The HTTP status code.
            status:
              type: string
              description: >-
                A short category name, for example `NotFound`, `InvalidArgument`
                or `FailedPrecondition`.
            reason:
              type: string
              description: >-
                A stable, machine-readable reason when one applies, for example
                `insufficient_funds` when a launch is refused for billing.
                Branch on this, not on `message`.
            message:
              type: string
              description: A human-readable explanation. Its wording can change.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <credential>` to
        https://customer-api.mountthor.com. People use the session that `mthr
        login` stores (a token starting `mt_session_`, valid for up to 12
        hours). Automation uses a service-account credential (starting
        `mt_sa_v1_`, valid for 90 days) from Create credential. Each operation
        names the permission it needs. Service accounts hold permissions through
        custom roles, and some operations refuse them; those operations say so.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.