> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# stop_stream

> Stop a media stream on a call.

Stop a media stream on a call.

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /Accounts/{AccountSid}/Calls/{CallSid}/Streams/{Sid}:
    post:
      operationId: update_stream
      summary: Stop a Stream
      description: >-
        Stop a Stream.


        #### Permissions


        The API token used to authenticate must have the following scope(s)
        enabled to make a successful request: _Voice_.


        [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
      tags:
        - subpackage_streams
      parameters:
        - name: AccountSid
          in: path
          description: The Project ID that uniquely identifies the Account.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: CallSid
          in: path
          description: The unique identifier for the call.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: Sid
          in: path
          description: The unique identifier for the call.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallStreamResponse'
        '400':
          description: >-
            The request was invalid or cannot be processed. Check the error
            details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '401':
          description: Authentication failed. Please verify your credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '404':
          description: >-
            The requested resource was not found. Please verify the resource
            identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '422':
          description: >-
            The request could not be processed due to validation errors. Check
            the error details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '503':
          description: The service is temporarily unavailable. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCallStreamRequest'
servers:
  - url: https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
    description: SignalWire Compatibility API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    UpdateCallStreamRequestStatus:
      type: string
      enum:
        - stopped
      description: The status of the stream. Only 'stopped' is allowed.
      title: UpdateCallStreamRequestStatus
    UpdateCallStreamRequest:
      type: object
      properties:
        Status:
          $ref: '#/components/schemas/UpdateCallStreamRequestStatus'
          description: The status of the stream. Only 'stopped' is allowed.
      required:
        - Status
      description: Request body for updating a call stream.
      title: UpdateCallStreamRequest
    StreamStatus:
      type: string
      enum:
        - queued
        - in-progress
        - stopped
      description: Stream status.
      title: StreamStatus
    CallStreamResponse:
      type: object
      properties:
        sid:
          $ref: '#/components/schemas/uuid'
          description: The unique identifier for the stream.
        account_sid:
          $ref: '#/components/schemas/uuid'
          description: The unique identifier for the account.
        call_sid:
          $ref: '#/components/schemas/uuid'
          description: The unique identifier for the call.
        name:
          type: string
          description: The name of the stream.
        status:
          $ref: '#/components/schemas/StreamStatus'
          description: The status of the stream.
        date_updated:
          type: string
          description: The date, in RFC 2822 GMT format, this stream was updated.
        uri:
          type: string
          description: The URI for the stream.
      required:
        - sid
        - account_sid
        - call_sid
        - name
        - status
        - date_updated
        - uri
      description: Response containing a single call stream.
      title: CallStreamResponse
    CompatibilityErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code.
        message:
          type: string
          description: Error message.
        more_info:
          type: string
          description: URL for more information about the error.
        status:
          type: integer
          description: HTTP status code.
      required:
        - code
        - message
        - more_info
        - status
      description: Error response model.
      title: CompatibilityErrorResponse

```

## **Response Example**

### Response (200)

```json
{
  "sid": "b3877c40-da60-4998-90ad-b792e98472st",
  "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
  "call_sid": "b3877c40-da60-4998-90ad-b792e98472ca",
  "name": "my_first_stream",
  "status": "queued",
  "date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Streams/b3877c40-da60-4998-90ad-b792e98472st.json"
}
```

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

client.compat.calls.stop_stream("CA...", "ST...", Status="stopped")
```