API reference for the addAudioTrack method.

Adds an audio track to the user's design.

To learn more, see Creating audio tracks.

import { addAudioTrack } from "@canva/design";
import { upload } from "@canva/asset";
// Upload an audio asset
const audio = await upload({
type: "AUDIO",
title: "Example audio",
mimeType: "audio/mp3",
durationMs: 86047,
url: "",
// Add the audio track to the user's design
await addAudioTrack({
ref: audio.ref,

Before an app that uses this method can be submitted for review, the canva:design:content:write permission must be enabled via the Developer Portal. To learn more, see Configuring permissions.


The options for adding an audio track to the user's design.


A unique identifier that points to an audio asset in Canva's backend.