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

# Reset a data stream

> Asynchronously wipes all records on the stream while preserving stream config, property definitions, and reconciliation links. Always async. Poll the returned operation.



## OpenAPI

````yaml /openapi.json post /data_streams/{key}/reset
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /data_streams/{key}/reset:
    post:
      summary: Reset a data stream
      description: >-
        Asynchronously wipes all records on the stream while preserving stream
        config, property definitions, and reconciliation links. Always async.
        Poll the returned operation.
      parameters:
        - in: path
          name: key
          required: true
          schema:
            type: string
          description: The immutable data stream key
      responses:
        '202':
          description: >-
            Reset accepted. Poll `GET /data_streams/{key}/operations/{id}` (also
            set in the `Location` header).
          headers:
            Location:
              description: URL of the operation to poll
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStreamOperation'
        '401':
          description: Unauthorized
        '404':
          description: Data stream not found
components:
  schemas:
    DataStreamOperation:
      type: object
      description: >-
        Async operation against a data stream (delete or reset). Poll via GET
        /data_streams/{key}/operations/{id}.
      properties:
        id:
          type: integer
        data_stream_id:
          type: integer
        data_stream_key:
          type: string
        kind:
          type: string
          enum:
            - delete
            - reset
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
        progress:
          type: integer
          description: Percentage 0-100
        error_message:
          type: string
          nullable: true
        started_at:
          type: string
          format: date-time
          nullable: true
        completed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        requested_by_user_id:
          type: integer
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````