Stop a Stream using either the SID of the Stream resource or the `name` used when creating the resource

POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams/{Sid}.json

The Stream resource allows you to create and stop uni-directional Media Streams

Stop a Stream using either the SID of the Stream resource or the name used when creating the resource

Path parameters

  • AccountSid string Required

    The SID of the Account that created this Stream resource.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

  • CallSid string Required

    The SID of the Call the Stream resource is associated with.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

  • Sid string Required

    The SID or the name of the Stream resource to be stopped

application/x-www-form-urlencoded

Body

  • Status string Required

    Value is stopped.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

      The SID of the Stream resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MZ[0-9a-fA-F]{32}$.

    • account_sid string | null

      The SID of the Account that created this Stream resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • call_sid string | null

      The SID of the Call the Stream resource is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

    • name string | null

      The user-specified name of this Stream, if one was given when the Stream was created. This can be used to stop the Stream.

    • status string

      The status of the Stream. Possible values are stopped and in-progress.

      Values are in-progress or stopped.

    • date_updated string(date-time-rfc-2822) | null

      The date and time in GMT that this resource was last updated, specified in RFC 2822 format.

    • uri string | null

      The URI of the resource, relative to https://api.twilio.com.

POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams/{Sid}.json
curl \
 --request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Streams/{Sid}.json' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Status=stopped'
Request examples
{"Status"=>"stopped"}
{"Status"=>"stopped"}
Response examples (200)
{
  "sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "name": null,
  "status": "stopped",
  "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
}
{
  "sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "name": "myStream",
  "status": "stopped",
  "call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
}