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

[Skip to content](#_top)

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

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

[Audio Tracks](https://developers.cloudflare.com/api/go/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

client.Stream.AudioTracks.Edit(ctx, identifier, audioIdentifier, params) (\*[Audio](<https://developers.cloudflare.com/api/go/resources/stream#(resource)%20stream.audio_tracks%20%3E%20(model)%20audio%20%3E%20(schema)>), error)

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

identifier string

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)>)

audioIdentifier string

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)>)

<details>

<summary>

params AudioTrackEditParams

</summary>

AccountID param.Field\[string]

Path param: The account identifier tag.

maxLength32

<a href="#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

Default param.Field\[bool]Optional

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

<a href="#(resource)%20stream.audio_tracks%20%3E%20(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20default">Link to this property</a>

Label param.Field\[string]Optional

Body param: 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(method)%20edit%20%3E%20(params)%20default%20%3E%20(param)%20label">Link to this property</a>

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type Audio struct{…}

</summary>

Default boolOptional

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 stringOptional

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 AudioStatusOptional

Specifies the processing status of the video.

</summary>

One of the following:

const AudioStatusQueued AudioStatus = "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>

const AudioStatusReady AudioStatus = "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>

const AudioStatusError AudioStatus = "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 stringOptional

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

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/stream"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  audio, err := client.Stream.AudioTracks.Edit(
    context.TODO(),
    "ea95132c15732412d22c1476fa83f27a",
    "ea95132c15732412d22c1476fa83f27a",
    stream.AudioTrackEditParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
  }
}
```