---
title: Edit additional audio tracks on a video
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Stream](https://developers.cloudflare.com/api/python/resources/stream)

[Audio Tracks](https://developers.cloudflare.com/api/python/resources/stream/subresources/audio_tracks)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Edit additional audio tracks on a video

stream.audio\_tracks.edit(straudio\_identifier, AudioTrackEditParams\*\*kwargs) -> [Audio](<https://developers.cloudflare.com/api/python/resources/stream#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)>)

PATCH/accounts/{account\_id}/stream/{identifier}/audio/{audio\_identifier}

Edits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Stream Write`

##### ParametersExpand Collapse

account\_id: str

The account identifier tag.

maxLength32

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

identifier: str

A Cloudflare-generated unique identifier for a media item.

maxLength32

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)>)

audio\_identifier: str

The unique identifier for an additional audio track.

maxLength32

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20audio_identifier%20%3E%20(schema)>)

default: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/stream/subresources/audio_tracks/methods/edit#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20default%20%3E%20(schema)>)]

Denotes whether the audio track will be played by default in a player.

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20default%20%3E%20(schema)>)

label: Optional\[str]

A string to uniquely identify the track amongst other audio track labels for the specified video.

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20label%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class Audio: …

</summary>

default: Optional\[bool]

Denotes whether the audio track will be played by default in a player.

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20default">Link to this property</a>

label: Optional\[str]

A string to uniquely identify the track amongst other audio track labels for the specified video.

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20label">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["queued", "ready", "error"]]

Specifies the processing status of the video.

</summary>

One of the following:

"queued"

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"ready"

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"error"

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

uid: Optional\[str]

A Cloudflare-generated unique identifier for a media item.

maxLength32

<a href="#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)%20%3E%20(property)%20uid">Link to this property</a>

</details>

[Link to this property](<#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)>)

### Edit additional audio tracks on a video

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
audio = client.stream.audio_tracks.edit(
    audio_identifier="ea95132c15732412d22c1476fa83f27a",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    identifier="ea95132c15732412d22c1476fa83f27a",
)
print(audio.uid)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "default": true,
    "label": "director commentary",
    "status": "queued",
    "uid": "ea95132c15732412d22c1476fa83f27a"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "default": true,
    "label": "director commentary",
    "status": "queued",
    "uid": "ea95132c15732412d22c1476fa83f27a"
  }
}
```