## Add audio tracks to a video `client.Stream.AudioTracks.Copy(ctx, identifier, params) (*Audio, error)` **post** `/accounts/{account_id}/stream/{identifier}/audio/copy` Adds an additional audio track to a video using the provided audio track URL. ### Parameters - `identifier string` A Cloudflare-generated unique identifier for a media item. - `params AudioTrackCopyParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Label param.Field[string]` Body param: A string to uniquely identify the track amongst other audio track labels for the specified video. - `URL param.Field[string]` Body param: An audio track URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. ### Returns - `type Audio struct{…}` - `Default bool` Denotes whether the audio track will be played by default in a player. - `Label string` A string to uniquely identify the track amongst other audio track labels for the specified video. - `Status AudioStatus` Specifies the processing status of the video. - `const AudioStatusQueued AudioStatus = "queued"` - `const AudioStatusReady AudioStatus = "ready"` - `const AudioStatusError AudioStatus = "error"` - `UID string` A Cloudflare-generated unique identifier for a media item. ### Example ```go 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.Copy( context.TODO(), "ea95132c15732412d22c1476fa83f27a", stream.AudioTrackCopyParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Label: cloudflare.F("director commentary"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", audio.UID) } ``` #### Response ```json { "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" } } ```