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

# Delete tunnel history

> Delete inactive tunnel history. Stop an active tunnel first.

Removes an inactive tunnel record owned by the current account and returns `204`
with no response body. This also removes its invitations, browser viewer grants,
and pending login transactions. Deletion cannot be undone.

A live tunnel or valid pending start returns `409` with error code
`TUNNEL_RECORD_ACTIVE` and the message "Stop this tunnel before deleting its
history". [Stop the tunnel](/api-reference/tunnels/stop) first, then delete the
record. Stopped, expired, and already timed-out records can be removed.

Deleted and other accounts' records return `404`. Deleted records no longer
appear in [List local tunnels](/api-reference/tunnels/list) or
[Inspect a local tunnel](/api-reference/tunnels/get).

The existing `DELETE /api/v1/tunnels/{id}` remains Stop and keeps history.


## OpenAPI

````yaml openapi/tunnels-api.json DELETE /api/v1/tunnels/{id}/record
openapi: 3.1.0
info:
  title: Rigbox Public API
  description: >-
    Gateway-owned public API for Rigbox. The gateway composes its local
    lifecycle API with service-owned exported specs.
  contact:
    name: Rigbox
    url: https://rigbox.dev
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.rigbox.dev
    description: Production gateway
security: []
tags:
  - name: Tunnels
paths:
  /api/v1/tunnels/{id}/record:
    delete:
      tags:
        - Tunnels
      description: Delete inactive tunnel history. Stop an active tunnel first.
      operationId: delete_record
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: ''
        '404':
          description: ''
        '409':
          description: ''
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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