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

# Delete Channel

> Delete a channel definition. Existing message history is preserved with null channelId values.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/realtime.yaml delete /api/realtime/channels/{id}
openapi: 3.0.3
info:
  title: Insforge Realtime API
  version: 1.0.0
  description: >-
    Realtime channel management, message history, permissions, and retention
    API. Live pub/sub uses Socket.IO.
servers: []
security: []
tags:
  - name: Channels
    description: Configure realtime channel patterns, webhooks, and availability.
  - name: Messages
    description: Inspect realtime message history and delivery stats.
  - name: Permissions
    description: Manage helper endpoints for realtime RLS examples.
  - name: Configuration
    description: Manage realtime retention settings.
paths:
  /api/realtime/channels/{id}:
    delete:
      tags:
        - Channels
      summary: Delete Channel
      description: >-
        Delete a channel definition. Existing message history is preserved with
        null channelId values.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Channel deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Channel deleted
        '404':
          description: Channel not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: NOT_FOUND
                message: Channel not found
                statusCode: 404
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
          example: INVALID_INPUT
        message:
          type: string
          description: Human-readable error message
          example: Invalid request
        statusCode:
          type: integer
          description: HTTP status code
          example: 400
        nextActions:
          type: string
          description: Suggested action to resolve the error
          example: Check your request parameters
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key

````