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

> Delete an S2 stream and its records.

# Delete a stream.

<Note>
  Deletion is an asynchronous operation, and it can take a few minutes to complete.

  During that time, a new stream by the same name will not be allowed.
</Note>


## OpenAPI

````yaml delete /streams/{stream}
openapi: 3.1.0
info:
  title: S2, the durable streams API
  description: Streams as a cloud storage primitive.
  termsOfService: https://s2.dev/terms
  contact:
    email: support@s2.dev
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://aws.s2.dev/v1
security:
  - access_token: []
tags:
  - name: metrics
    description: Usage metrics and data.
  - name: basins
    description: Manage basins
  - name: access-tokens
    description: Manage access tokens
  - name: locations
    description: Manage locations
  - name: streams
    description: Manage streams
  - name: records
    description: Manage records
paths:
  /streams/{stream}:
    servers:
      - url: https://{basin}.b.s2.dev/v1
        description: Endpoint for the basin
        variables:
          basin:
            default: ''
            description: Basin name
    delete:
      tags:
        - streams
      summary: Delete a stream.
      operationId: delete_stream
      parameters:
        - name: stream
          in: path
          description: Stream name.
          required: true
          schema:
            $ref: '#/components/schemas/StreamNameStr'
      responses:
        '202':
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '408':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
components:
  schemas:
    StreamNameStr:
      type: string
      maxLength: 512
      minLength: 1
    ErrorInfo:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    access_token:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your access token.

````