> ## 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 a Stream Template

> Delete a stream template from your workspace.

## Overview

Removes a template from your workspace. Only the template entry is deleted:
the stream it was saved from, and any streams created from the template, are
unaffected.

Each workspace can hold at most 20 templates. Once the limit is reached,
saving a new template requires deleting one first.

Templates are scoped to your workspace: requesting a template that belongs to
another workspace returns `404`.

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

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

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

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

<ResponseExample>
  ```json Response theme={null}
  {
    "id": 12
  }
  ```
</ResponseExample>

## Related endpoints

* [List Stream Templates](list-templates)
* [Use a Stream Template](use-template)


## OpenAPI

````yaml delete /stream/templates/{template_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://client.camb.ai/apis
security: []
paths:
  /stream/templates/{template_id}:
    delete:
      tags:
        - Apis
        - Streaming
      summary: Delete a Stream Template
      description: >-
        Delete a stream template from your workspace. The stream it was saved
        from is unaffected. Each workspace can hold at most 20 templates, so
        delete one to make room when the limit is reached.
      operationId: delete_stream_template_stream_templates__template_id__delete
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: integer
            exclusiveMinimum: 0
            title: Template Id
      responses:
        '200':
          description: The deleted template's id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteStreamTemplateOut'
        '404':
          description: No template with this id exists in your workspace.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DeleteStreamTemplateOut:
      type: object
      title: DeleteStreamTemplateOut
      required:
        - id
      properties:
        id:
          type: integer
          title: Id
          description: The id of the deleted template.
    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.

````