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

# Delete an SRT Flow

> Delete a stream flow and shut down its SRT endpoint.

## Overview

Deletes a flow and shuts down its SRT endpoint. Its URLs stop working
immediately.

<Warning>
  Deletion is permanent, and a new flow gets new URLs and a new key. Make sure
  no encoders or streams are still using this flow before deleting it.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://client.camb.ai/apis/flows/42" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      "https://client.camb.ai/apis/flows/42",
      headers={"x-api-key": "YOUR_API_KEY"},
  )

  response.raise_for_status()
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  { "status": "deleted", "id": 42 }
  ```
</ResponseExample>

## Errors

* `404` - No flow with this ID belongs to your team.

## Related endpoints

* [Create an SRT Flow](create-flow)
* [List SRT Flows](list-flows)


## OpenAPI

````yaml delete /flows/{flow_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /flows/{flow_id}:
    delete:
      tags:
        - Apis
        - Streaming
      summary: Delete Flow
      description: Delete a flow and shut down its relay endpoint.
      operationId: delete_flow_flows__flow_id__delete
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: integer
            title: Flow Id
          description: Identifier of the flow.
      responses:
        '200':
          description: Deletion confirmation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: deleted
                  id:
                    type: integer
        '404':
          description: Flow not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The `x-api-key` is a custom header required for authenticating requests
        to our API. Include this header in your request with the appropriate API
        key value to securely access our endpoints. You can find your API key(s)
        in the 'API' section of our studio website.

````