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

# Delete stream

> Stops stream if live. Removes stream key. Does not delete recordings.



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/livestream-api.json delete /streams/{streamId}
openapi: 3.0.1
info:
  title: Tenbyte Livestream API
  description: >-
    Live video and audio transcoding infrastructure as a service. Ingest via
    RTMP/SRT (push) or pull from upstream sources, transcode to adaptive
    bitrate, deliver via HLS/DASH.
  version: 1.0.0
servers:
  - url: https://api.tenbyte.io/v1/livestream
    description: Production server
security:
  - BearerAuth: []
  - apikey-header-X-API-Key: []
tags:
  - name: Health
  - name: Streams
  - name: Webhooks
paths:
  /streams/{streamId}:
    delete:
      tags:
        - Streams
      summary: Delete stream
      description: Stops stream if live. Removes stream key. Does not delete recordings.
      operationId: deleteStream
      parameters:
        - name: streamId
          in: path
          description: ''
          required: true
          example: 0000cf2e-ae90-46bc-b119-f5f626258434
          schema:
            type: string
      responses:
        '204':
          description: Stream deleted
          headers: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: Missing or invalid authentication
        '404':
          $ref: '#/components/responses/NotFound'
          description: Resource not found
        '409':
          $ref: '#/components/responses/Conflict'
          description: Action conflicts with current state
      deprecated: false
      security:
        - BearerAuth: []
        - apikey-header-X-API-Key: []
components:
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            Unauthorized:
              summary: Success
              value:
                success: false
                code: UNAUTHORIZED
                message: >-
                  Missing authorization. Provide Authorization header or
                  X-API-Key header.
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            NotFound:
              summary: Success
              value:
                success: false
                code: NOT_FOUND
                message: Resource not found.
    Conflict:
      description: Action conflicts with current state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            Conflict:
              summary: Success
              value:
                success: false
                code: INTERNAL_ERROR
                message: cannot delete stream while live
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
    ErrorItem:
      type: object
      properties:
        field:
          type: string
          nullable: true
        code:
          type: string
        message:
          type: string
        details:
          type: object
          properties: {}
          nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: RSA-signed JWT token
    apikey-header-X-API-Key:
      type: apiKey
      in: header
      name: X-API-Key
      description: HMAC-signed API key with prefix `tkb`

````